| xlsgen > overview > Workbook |
Workbook is the first object instance you create from a running xlsgen instance.
You can create or open existing workbooks on a storage device using a fully qualified filepath (hard drive, remote directory, ...) or in memory.
Starting with a workbook, you can create an arbitrary number of worksheets.
There are a number of options available from the IXlsWorkbook object interface :
FactorizedStringsMode : stores the same label only once (smaller Excel files)
FactorizedFloatsMode : tries to factorize adjacents floating-point values (smaller Excel files)
StyleOption : defines whether altering an existing workbook should affect the style and the content simultaneously.
FormulaLanguage : sets the locale language to use for reading and writing formulas. xlsgen supports English and French.
IgnoreErrorNumberAsText : in Excel itself, avoids showing a green triangle in the top-left corner of cells where a number is stored as a string. Applies to Excel XP and above only (it will not cause crashes in earlier Excel versions).
CalculationOptions : defines the behavior of the calculation engine, particularly in regards to the retained mode (auto-recalc).
ExcelTargetVersion : sets the version of Excel to target. It is useful with formulas if you'd like to avoid that Excel brings a user prompt when closing a document.
Workbook properties : lets you read and write the document summary properties such as the Author, Title, Date, ...
Named Ranges : lets you retrieve and edit existing named ranges.
EnforceDataValidation : enables/disables the enforcement of data validation rules when data is added in the spreadsheet.
AutoAdjustDefinedNames : enables/disables the auto-adjusting of defined names when new data is added to rows or columns. The adjusting mechanism works by monitoring whenever data is added in rows just below the range of a defined name, or a column just on the right of the range of a defined name. The adjusting simply inflates the range to include said data.
Arabic : allows to set whether or not the spreadsheet should use the Arabic user interface (right-to-left).
AutoOpenExternalWorkbookReference : enables/disables the automatic opening of external workbooks whenever formulas need it.
Commit : enables/disables whether the changes should be committed into the output file.
DisplaySheetTabs : enables/disables the workbook to display the sheet tabs.
DisplayRowHeadings : enables/disables the workbook to display row headings in sheets.
ShowZeros : enables/disables the workbook to display zeros in sheets.
IsUsing1904Dates : lets know if the spreadsheet uses 1904-offset dates, often a default on spreadsheets created with a Mac computer.
GridA1Mode : allows to set whether or not the spreadsheet uses numeric column headers as opposed to alphabetic column headers, as well as the way cell references in formulas are displayed, using numeric coding or an alphabetic coding.
TreatFloatsAsStrings : allows to set whether or not the spreadsheet returns that floats are strings in CellType() whenever the floats are actually stored as strings. Off by default (i.e. returns float data type).