Supported File Formats
GemBox.Spreadsheet supports multiple file formats with varying degree of support.
GemBox.Spreadsheet Feature Support
Following list describes each icon used in the subsequent tables.
- Feature is supported (it can be created, modified or removed with GemBox.Spreadsheet).
- Feature is not applicable for file format (file format is not designed to support this kind of feature).
- Feature is not supported (it cannot be created, modified or removed with GemBox.Spreadsheet, nor it will be preserved when loading and saving to the same file format).
GemBox.Spreadsheet Format Support
GemBox.Spreadsheet Feature Support
Supported Image Formats
GemBox.Spreadsheet supports writing worksheet to 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).
Open XML (.XLSX) and OpenDocument (.ODS) formats have become industry standards, because they are open, standardized and extensible. You can read XLSX files in Microsoft Excel 2003 and older by using Microsoft Office Compatibility Pack. ODS files are fully supported in Microsoft Excel 2007 SP2.
Additional conversion outputs
In addition to exporting to a file or a stream, GemBox.Spreadsheet also supports printing a workbook ( Print() method) and converting a workbook to the following types:
- using the ExcelFile.ConvertToXpsDocument(XpsSaveOptions) method and
- ImageSource using the ExcelFile.ConvertToImageSource(ImageSaveOptions) method.
// 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);
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.
Support for these members will be added in future versions of GemBox.Spreadsheet based on customer feedback.
Support for ISO-standardized versions of the Portable Document Format (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:
Support for Partially Trusted applications
Most of the Internet Service Providers restrict hosted ASP.NET applications to Medium Level Trust and by doing so, disable accessing files outside the application directory, among other things, as explained in trust Element (ASP.NET Settings Schema) level Attribute.
GemBox.Spreadsheet support for Partially Trusted applications depends on the used file formats as follows:
- Excel Workbooks (XLSX), Excel 97-2003 Workbooks (XLS), OpenDocument Spreadsheets (ODS), Character-separated-values text files (CSV), Fixed-columns-width text files (TXT) and Web Pages (HTML) are fully supported in Partially Trusted applications.
- Adobe Portable Document Format (PDF) is supported in Partially Trusted applications if font location is set to a directory that is available to the Partially Trusted application.
Setting the font location directory is necessary for Partially Trusted applications because they can only access files inside the application directory, and font files are, by default, located in C:\Windows\Fonts, which is restricted to Partially Trusted applications. For more information on how to set font location directory, see Private Fonts example. Font files are, usually, copyrighted, so make sure you conform to the font license, before copying a font file to another location.
- Creating a digitally signed PDF file is not supported in Partially Trusted applications because ComputeSignature() does not work in partial trust.
- Microsoft XMP Paper Specification (XPS) is not supported in Partially Trusted applications because ReachFramework.dll assembly, where most of the XPS implementation resides, is not decorated with AllowPartiallyTrustedCallersAttribute.
- Image formats (PNG, JPEG, GIF, BMP, TIFF, WMP) are not supported in Partially Trusted applications because BitmapEncoder class and its derived classes, used for writing image data to the specific image file format, do not work in partial trust.
- Printing is not supported in Partially Trusted applications because it uses XPS infrastructure.