Supported File Formats
GemBox.Spreadsheet supports multiple file formats with a varying degree of support.
Supported Image Formats
GemBox.Spreadsheet supports writing worksheet to the following image formats:
- Portable Network Graphics (PNG) format,
- Joint Photographic Experts Group (JPEG) format,
- Graphics Interchange Format (GIF),
- Bitmap (BMP) format,
- Tagged Image File Format (TIFF),
- Windows Media Photo (WMP) format,
- Scalable Vector Graphics (SVG).
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
- ImageSource 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 DocumentViewer and Image controls.
The following code snippet shows how to assign a ExcelFile instance to DocumentViewer and Image 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:
- ExcelWorksheet property PivotTables.
- ExcelPrintOptions properties:
- Entire ExcelViewOptions class except properties ShowZeroValues, ShowFormulas, and ShowColumnsFromRightToLeft.
- ExcelRow and ExcelColumn properties Collapsed and OutlineLevel.
- ShapeType all fields except Line, Rectangle, RoundedRectangle, Oval, SnipSingleCornerRectangle, SnipSameSideCornerRectangle, SnipDiagonalCornerRectangle, IsoscelesTriangle, RightTriangle, Parallelogram, Trapezoid, Diamond, RegularPentagon, Hexagon, Octagon, RightArrow, LeftArrow, UpArrow, DownArrow, LeftRightArrow, UpDownArrow, Pentagon, RectangularCallout, RoundedRectangularCallout, and OvalCallout.
- 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.
- 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.