Supported File Formats
GemBox.Spreadsheet supports multiple file formats with varying degree of support.
The following sections explain file formats support in more detail and present other, file format specific, valuable information:
Following list describes each icon used in the subsequent table(s).
- 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 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.
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 compatibility pack.
ODS files are fully supported in Microsoft Excel 2007 SP2.
In addition to exporting to a file or a stream, GemBox.Spreadsheet also supports printing a workbook (ExcelFilePrint method) and converting a workbook to the following types:
// 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);
' 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)
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:
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.
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.
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.