Excel class

Decode a excel file.

Constructors

Excel.createExcel()
factory
Excel.decodeBuffer(InputStream input)
factory
Excel.decodeBytes(List<int> data)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
parser Parser
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sheets Map<String, Sheet>
Returns the Map<String, Sheet>
no setter
tables Map<String, Sheet>
It will return tables as map in order to mimic the previous versions reading the data.
no setter

Methods

appendRow(String sheet, List<CellValue?> row) → void
Appends row iterables just post the last filled index in the sheet
copy(String fromSheet, String toSheet) → void
Copies the content of fromSheet into toSheet.
delete(String sheet) → void
If sheet exist in excel.tables.keys and excel.tables.keys.length >= 2 then it will be deleted.
encode() List<int>?
It will start setting the edited values of sheets into the files and then exports the file.
findAndReplace(String sheet, Pattern source, dynamic target, {int first = -1, int startingRow = -1, int endingRow = -1, int startingColumn = -1, int endingColumn = -1}) int
Returns the count of replaced source with target
getDefaultSheet() String?
returns the name of the defaultSheet (the sheet which opens firstly when xlsx file is opened in excel based software).
getMergedCells(String sheet) List<String>
returns an Iterable of cell-Id for the previously merged cell-Ids.
insertColumn(String sheet, int columnIndex) → void
Inserts an empty column in sheet at position = columnIndex.
insertRow(String sheet, int rowIndex) → void
Inserts an empty row in sheet at position = rowIndex.
insertRowIterables(String sheet, List<CellValue?> row, int rowIndex, {int startingColumn = 0, bool overwriteMergedCells = true}) → void
If sheet does not exist then it will be automatically created.
sheet2Object will be linked with sheet1.
merge(String sheet, CellIndex start, CellIndex end, {CellValue? customValue}) → void
Merges the cells starting from start to end.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeColumn(String sheet, int columnIndex) → void
If sheet exists and columnIndex < maxColumns then it removes column at index = columnIndex
removeRow(String sheet, int rowIndex) → void
If sheet exists and rowIndex < maxRows then it removes row at index = rowIndex
rename(String oldSheetName, String newSheetName) → void
Changes the name from oldSheetName to newSheetName.
save({String fileName = 'FlutterExcel.xlsx'}) List<int>?
Starts Saving the file. On Web
setDefaultSheet(String sheetName) bool
It returns true if the passed sheetName is successfully set to default opening sheet otherwise returns false.
toString() String
A string representation of this object.
inherited
If sheet is linked with any other sheet's object then it's link will be broke
unMerge(String sheet, String unmergeCells) → void
unMerge the merged cells.
updateCell(String sheet, CellIndex cellIndex, CellValue? value, {CellStyle? cellStyle}) → void
Updates the contents of sheet of the cellIndex: CellIndex.indexByColumnRow(0, 0); where indexing starts from 0

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String sheet) Sheet
It will return the SheetObject of sheet.
operator []=(String sheet, Sheet sheetObject) → void
If sheet does not exist then it will be automatically created with contents of sheetObject