Excel class Core
The main class for reading, creating, and editing Excel .xlsx files.
Constructors
- Excel.createExcel()
-
Creates a new blank Excel workbook with a default sheet.
factory
- Excel.decodeBuffer(InputStream input)
-
Decodes an
.xlsxfile from anInputStream.factory -
Excel.decodeBytes(List<
int> data) -
Decodes an
.xlsxfile from a byte list.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 all sheets as a map of sheet names to Sheet objects.
no setter
-
tables
→ Map<
String, Sheet> -
Returns all sheets as a map of sheet names to Sheet objects.
no setter
Methods
-
appendRow(
String sheet, List< CellValue?> row) → void -
Appends
rowafter the last filled row insheet. -
copy(
String fromSheet, String toSheet) → void -
Copies contents of
fromSheetintotoSheet. -
delete(
String sheet) → void -
Deletes
sheetif it exists and is not the last sheet. -
encode(
) → List< int> ? -
Encodes the workbook as
.xlsxbytes. -
findAndReplace(
String sheet, Pattern source, dynamic target, {int first = -1, int startingRow = -1, int endingRow = -1, int startingColumn = -1, int endingColumn = -1}) → int -
Replaces occurrences of
sourcewithtargetinsheet. Returns the count of replacements. -
getDefaultSheet(
) → String? - Returns the name of the default sheet.
-
getMergedCells(
String sheet) → List< String> -
Returns a list of merged cell ranges (e.g.
"A1:B2") insheet. -
insertColumn(
String sheet, int columnIndex) → void -
Inserts an empty column at
columnIndexinsheet. -
insertRow(
String sheet, int rowIndex) → void -
Inserts an empty row at
rowIndexinsheet. -
insertRowIterables(
String sheet, List< CellValue?> row, int rowIndex, {int startingColumn = 0, bool overwriteMergedCells = true}) → void -
Inserts
rowvalues atrowIndexinsheet. -
link(
String sheet1, Sheet existingSheetObject) → void -
Links
sheet1toexistingSheetObjectso changes to one affect the other. -
merge(
String sheet, CellIndex start, CellIndex end, {CellValue? customValue}) → void -
Merges cells from
starttoendinsheet. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeColumn(
String sheet, int columnIndex) → void -
Removes the column at
columnIndexfromsheet. -
removeRow(
String sheet, int rowIndex) → void -
Removes the row at
rowIndexfromsheet. -
rename(
String oldSheetName, String newSheetName) → void -
Renames
oldSheetNametonewSheetName. -
save(
{String fileName = 'FlutterExcel.xlsx'}) → List< int> ? -
Starts Saving the file.
On Web -
setDefaultSheet(
String sheetName) → bool -
Sets
sheetNameas the default opening sheet. Returnstrueon success. -
toString(
) → String -
A string representation of this object.
inherited
-
unLink(
String sheet) → void -
Breaks the link between
sheetand any shared sheet object. -
unMerge(
String sheet, String unmergeCells) → void -
Unmerges the given
unmergeCellsrange (e.g."A1:A2") insheet. -
updateCell(
String sheet, CellIndex cellIndex, CellValue? value, {CellStyle? cellStyle}) → void -
Updates a cell's value and optional style at
cellIndexinsheet.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
String sheet) → Sheet -
Returns the Sheet for
sheet, creating it if it doesn't exist. -
operator []=(
String sheet, Sheet sheetObject) → void -
Sets
sheetcontents to a clone ofsheetObject.