Workbook class

Represents an Excel Workbook.

Constructors

Workbook([int? count])
Creates an new instances of the Workbook.
Workbook.withCulture(String culture, [String? currency, int? count])
Creates an new instances of the Workbook with currency.

Properties

archive ↔ Archive
Represents zip archive to save the workbook.
getter/setter pair
bCellProtect bool
True if cells are protected.
getter/setter pair
borders List<Borders>
Represents the border collection in the workbook.
getter/setter pair
builtInProperties ↔ BuiltInProperties
Represents the build in properties.
getter/setter pair
bWindowProtect bool
True if window is protected.
getter/setter pair
cellStyles Map<String, GlobalStyle>?
Represents the cell style collection in the workbok.
getter/setter pair
cellStyleXfs List<CellStyleXfs>
Represents the CellStyleXf collection in the workbook.
getter/setter pair
cellXfs List<CellXfs>
Represents the CellXf collection in the workbook.
getter/setter pair
chartCount int
Represents the chart count in the workbook.
getter/setter pair
culture String
Represents the current culture.
getter/setter pair
cultureInfo CultureInfo
Represents the current culture info.
no setter
currency String
Represents the current culture currency.
getter/setter pair
defaultContentType Map<String, String>
Gets dictionary with default content types.
no setter
defaultContentTypes Map<String, String>
final
dMaxDigitWidth double
Maximum digit width (used to evaluate different column width).
final
drawingCount int
Represents the drawing count in the workbook.
getter/setter pair
fills Map<String, int>
Represents the Fill collection in the workbook.
getter/setter pair
fonts List<Font>
Represents the font collection in the workbook.
getter/setter pair
globalStyles Map<String, GlobalStyle>
Represents the cell style collection in the workbok.
no setter
hashCode int
The hash code for this object.
no setterinherited
imageCount int
Represents the image count in the workbook.
getter/setter pair
innerFormats FormatsCollection
Represents the formats collection.
no setter
innerNamesCollection List<Name>
Represents the name collection in the workbook.
getter/setter pair
isPassword int
16-bit hash value of the password.
getter/setter pair
isRightToLeft bool
Indicates whether the worksheet is displayed from right to left.FALSE by default
getter/setter pair
maxColumnCount int
Represents the maximum column count in the workbook.
final
maxRowCount int
Represents the maximum row count in the workbook.
final
maxTableIndex int
Maximum used table index.
getter/setter pair
mergedCellsStyle Map<String, ExtendStyle>
Represents the merged cell collection in the workbok.
getter/setter pair
names Names
Represents workbook named range collection.
no setter
namesColl Names?
Represents workbook named range collection.
getter/setter pair
numberFormatChar String
Use this NumberFormatChar to check the Unicodes.
final
password String?
Workbook Password.
getter/setter pair
previousTableCount int
Represents the previous table count in the workbook.
getter/setter pair
rgbColors Map<String, String>?
Represents the RGB colors.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saving bool
Indicates whether the workbook is saving.
getter/setter pair
sharedStringCount int
Represents the shared string count in the workbook.
getter/setter pair
sharedStrings Map<String, int>
Represents the shared string list.
no setter
standardFont String
Gets or sets the standard font name.
no setter
standardFontSize double
Gets or sets the standard font size.
no setter
styles StylesCollection
Represents the cell style collection in the workbook.
no setter
tableCount int
Represents the table count in the workbook.
getter/setter pair
unitProportions List<double>
Represents the unit conversion list.
no setter
worksheets WorksheetCollection
Represents the worksheet collection.
no setter

Methods

convertFromPixel(double value, int to) double
Converts from pixel.
convertToPixels(double value, int from) double
Converts to pixels.
convertUnits(double value, int from, int to) double
Converts units.
dispose() → void
Dispose objects.
fileWidthToPixels(double fileWidth) double
Convert column width that is stored in file into pixels.
getCultureInfo() CultureInfo
Gets the culture info.
getMeasuredRectangle(String text, Font font, Rectangle<num> bounds) Rectangle<num>
Measure the Text with a given font.
getTextSizeFromFont(String text, Font font) SizeF
Measure the text with the input font and returns the size.
isNewFont(CellStyle toCompareStyle) → ExtendCompareStyle
Check whether the cell style font already exists.
measureString(String strValue, Font font) SizeF
Measures the specified string when drawn with this font.
measureStringSpecial(String strValue, Font font) SizeF
Measures the specified string in special way (as close as possible to MS Excel).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelsToWidth(int pixels) double
Converts column width in pixels into column width in characters.
protect(bool isProtectWindow, bool isProtectContent, [String? sPassword]) → void
Protect workbook using the password from moving, hiding, adding and renaming the worksheet.
save() Future<List<int>>
Saves workbook as Future.
saveAsCSV(String separator) List<int>
Saves workbook as CSV format.
saveAsStream() List<int>
Saves workbook as stream.
saveSync() List<int>
Saves workbook.
toString() String
A string representation of this object.
inherited
widthToFileWidth(double width) double
Converts column width in characters into column width in file.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isAllBorder(Borders toCompareBorder) bool
Check if line style and color is applied for all borders.
isNewBorder(CellStyle toCompareStyle) bool
Check whether the cell border already exists.