Supported File Formats
GemBox.Spreadsheet supports multiple file formats with a varying degree of support.
Read and write
- Microsoft Excel Workbook (XLSX).
- Microsoft Excel Binary Workbook (XLSB).
- Microsoft Excel 97-2003 Workbook (XLS).
- OpenDocument Spreadsheet (ODS).
- HyperText Markup Language (HTML).
- Comma Separated Value (CSV).
- Plain text (TXT).
Read only
- SpreadsheetML (XML).
Write only
- MIME HyperText Markup Language (MHTML).
- Adobe Portable Document Format (PDF).
- Microsoft XML Paper Specification (XPS).
- Image formats (SVG, PNG, JPEG, GIF, BMP, TIFF, WMP).
Additional conversion outputs
In addition to exporting to a file or a stream, GemBox.Spreadsheet also supports workbook printing (ExcelFile.Print() method) and converting to the following types:
- using the ExcelFile.ConvertToXpsDocument(XpsSaveOptions) method and
- using the ExcelFile.ConvertToImageSource(ImageSaveOptions) method.
These outputs are especially useful in WPF applications, by providing a means to embed a spreadsheet in your WPF application with and controls.
The following code snippet shows how to assign a ExcelFile instance to and controls:
// Assign an ExcelFile instance to DocumentViewer control.
documentViewer.Document = workbook.ConvertToXpsDocument(SaveOptions.XpsDefault).GetFixedDocumentSequence();
// Assign an ExcelFile instance to Image control.
image.Source = workbook.ConvertToImageSource(SaveOptions.ImageDefault);
Additionally, worksheet drawings (pictures, charts, etc.) can be exported to PDF, XPS, and image formats; printed or embedded in WPF application. For more information, see drawing export.
Support level for PDF, XPS, and image formats
Exporting a spreadsheet to a fixed document file format, such as PDF and XPS, and to image formats is accomplished with GemBox.Spreadsheet internal paginator and renderer that are commonly used for all formats mentioned. This means that PDF, XPS, and image formats share the same level of support for spreadsheet features, since they are all rendered in the same way.
The following list contains GemBox.Spreadsheet API members that are, currently, not supported when exporting to PDF, XPS, and image formats:
- ExcelPrintOptions properties:
- SheetHeaderFooter property AlignWithMargins.
- HorizontalAlignmentStyle fields Fill and CenterAcross.
- VerticalAlignmentStyle fields Justify and Distributed.
- LineStyle field SlantDashDot.
- All FillPatternStyle fields except None and Solid.
- UnderlineStyle fields SingleAccounting and DoubleAccounting.
- All DrawingUnderlineStyle fields except None, None, Single, Double, Dotted, Dash, DotDash, DotDotDash, and Words.
- HorizontalAlignment fields Distributed, JustifyLow, and DistributedThai.
- LineFormat property CompoundType.
- TextBoxFormat properties:
- TextDirection fields Stacked, StackedRightToLeft, Rotate90EastAsian, and Rotate90Mongolian.
- TextFormat properties:
- VerticalAlignment fields Justify and Distributed.
- PivotTable property BuiltInStyle.
- Table property BuiltInStyle.
- Members from GemBox.Spreadsheet.Charts namespace listed in the following link: unsupported chart members in PDF.
Note
Support for these members will be added in future versions of GemBox.Spreadsheet based on customer feedback.
Support for ISO-standardized versions of PDF
GemBox.Spreadsheet supports writing to PDF/A, the ISO-standardized version of the Portable Document Format (PDF) specialized for long-term archiving of electronic documents.
The following list contains conformance levels that are currently supported when exporting to PDF format:
- PDF/A-1a,
- PDF/A-1b,
- PDF/A-2a,
- PDF/A-2b,
- PDF/A-2u,
- PDF/A-3a,
- PDF/A-3b,
- PDF/A-3u.