ExcelWriter Xojo Plugin

ExcelWriterWorkbook Class (console safe)

Object that represents Excel Workbook.

This class has only private constructor so instances cannot be created directly. To create instance of this class you call one of the shared Create functions on this class.

This class can only write new xlsx files. It cannot open existing or add to existing xlsx files.

Object
   ExcelWriterWorkbook

class ExcelWriterWorkbook

Constructors

ExcelWriterWorkbookA private constructor that cannot be called.

Properties

Properties (console safe) Gets or sets properties for the workbook.

Methods

AddChart (console safe) Creates new chart of given type in the workbook.
AddFormat (console safe) Creates new ExcelWriterFormat object.
AddWorksheet (console safe) Creates new ExcelWriterWorksheet object using default naming for the worksheet.
AddWorksheet (console safe) Creates new ExcelWriterWorksheet object taking parameter with name of the worksheet.
Close (console safe) Writes out the xlsx document file and cleans up memory used by internal object.
shared CreateCreates ExcelWriterWorkbook object which will be placed as xlsx document at given location. Using Zip compression engine passed in by parameter. This variation has extra parameter where constant memory can be requested which is to support huge documents.
shared CreateCreates ExcelWriterWorkbook object which will be placed as xlsx document at given location. Using Zip compression engine passed in by parameter.
DefineName (console safe) Defines a name to be used in formulas.

Dim f as FolderItem

f = GetSaveFolderItem("*.*","Test.xlsx")

if f <> nil then
    Dim writer as ExcelWriterWorkbook = ExcelWriterWorkbook.Create(f, ZStream.GetZipEngineHandle())
    Dim sheet as ExcelWriterWorksheet = writer.AddWorksheet()
    Dim format as ExcelWriterFormat = writer.AddFormat()
   
    format.Italic = true
   
    sheet.CellText(2,2,format) = "Hello world"
   
    call writer.Close()
end if

Supported Platforms:

  • MacOS X Carbon
  • MacOS X Cocoa 32 bit
  • MacOS X Cocoa 64 bit
  • Windows 32 bit
  • Windows 64 bit
  • Linux 32 bit
  • Linux 64 bit
  • Linux ARM