|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).
File formats from which GemBox.Spreadsheet can read.
File formats to which GemBox.Spreadsheet can write.
Built-in & custom workbook properties.
Number formats, text alignment, font settings, borders, background fill, column width, row height.
In-line Text Formatting
Different font settings for parts of a textual cell value.
Conditional Formatting is loaded from and saved to XLSX file format only.
Conditional Formatting calculation is currently not supported.
Row/Column Outline & Group
Defined Names & Formulas
Workbook and worksheet scope defined names, formula reading/writing.
JPEG, PNG, GIF, BMP, TIF, EMF, EXIF, ICO.
Column, Bar, Line, Area, Pie.
Internal & external hyperlinks.
Text, author, visibility and size.
Pivot Tables are loaded from and saved to XLSX file format only.
Pivot Table data calculation is currently not supported.
AutoFilter & SortState
Filtering and sorting can be executed in spreadsheet read from any input file format.
Filtering and sorting settings are loaded from and saved to XLSX file format only.
Validation criteria, input message, error alert.
Sheet Header & Footer
First page, even pages and default header/footer.
Sheet Horizontal & Vertical Page Breaks
Sheet Split/Freeze Panes
Set pane state and position.
Sheet Page Setup
Margins, orientation, size, etc.
Sheet View & Print Options
Gridlines, headings, etc.
Sheet Protection Options
Simple password sheet protection, restrict selection, insertion, removal, editing, etc.
Certain Charts, Drawing Shapes, Embedded Objects
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:
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.
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.