-
-
Notifications
You must be signed in to change notification settings - Fork 31
Home
Spreadsheet.CreateNewAsync is the starting point for creating an XLSX file. It can write to any writable Stream, such as a memory stream, a file stream, or for example a stream to a blob in Azure Blob storage. Note that this library can only create new spreadsheet files, it can not open existing or append rows to an existing file.
The method takes an optional SpreadCheetahOptions parameter. See more details about that here.
Spreadsheet.CreateNewAsync returns an instance of Spreadsheet, which contains methods for adding data into a spreadsheet. Note that the class is not thread safe, meaning that a single Spreadsheet instance should not be accessed concurrently from multiple threads.
Spreadsheet instances are stateful and works in a forward-only manner. Calling StartWorksheetAsync starts the first worksheet, and subsequent calls to AddRowAsync adds rows into that worksheet. Calling StartWorksheetAsync again on the same instance starts the second worksheet, and calls to AddRowAsync will now add rows into the second worksheet. The forward-only manner means that there is no way to go back to a previously added worksheet or a previously added row, but the advantage of this approach is that the memory footprint can be kept low.
Cell data types
string-
int,long -
float,double,decimal boolDateTime
Cell styling (wiki page)
- Alignment (horizontal/vertical, wrapping text, indentation)
- Borders
- Fill color
- Fonts (font name, size, color, bold, italic, underline, strikethrough)
- Number format (custom or standard)
Default styling (wiki page)
- Column and row styles
- Global default font
Worksheet options
- Setting column width
- Setting row height
- Freezing columns and rows
- Hiding columns
- Hiding gridlines
- Hiding worksheets
- Auto filter
- Tab color
Data validations for
- Decimal
- Integer
- DateTime
- Text length
- Values from a list
- Values from a range of cells
Other
- Formulas
- Merging cells
- Row grouping
- Plain-text notes (formerly called "comments" in earlier versions of Excel)
- Tables
- Adding embedded images
Something missing? New features will be prioritized from the list of issues: https://github.com/sveinungf/spreadcheetah/issues