FlexCelImgExport Class
A component for exporting an Excel file to an image. It can return an image object, or the actual bytes of a specific file format. (like gif, tiff or png)
Syntax
Namespace: FlexCel.Render
public class FlexCelImgExport: Component
Constructors
Name | Description |
---|---|
FlexCelImgExport | Overloaded FlexCelImgExport FlexCelImgExport(ExcelFile) FlexCelImgExport(ExcelFile, Boolean) |
Methods
Name | Description |
---|---|
OnBeforePaint | Replace this event when creating a custom descendant of FlexCelImgExport. |
OnAfterPaint | Replace this event when creating a custom descendant of FlexCelImgExport. |
ExportNext | Overloaded ExportNext(TUIGraphics, TImgExportInfo) ExportNext(Stream, ImageColorDepth, TXlsImgType, TImgExportInfo) ExportNext(String, ImageColorDepth, TXlsImgType, TImgExportInfo) ExportNext(Stream, PixelFormat, ImageFormat, TImgExportInfo) ExportNext(String, PixelFormat, ImageFormat, TImgExportInfo) |
TotalPages | Return the pages to print. This is a costly operation, so cache the results. |
GetRealPageSize | Overloaded GetRealPageSize GetRealPageSize(Int32) |
GetFirstPageExportInfo | Returns information needed for exporting multiple pages on one sheet. You normally don't need to use this method, but you can use it to speed up multiple displays. |
SaveAsImage | Overloaded SaveAsImage(String, ImageExportType, ImageColorDepth) SaveAsImage(Stream, ImageExportType, ImageColorDepth) |
Properties
Name | Description |
---|---|
Workbook | The ExcelFile to print. |
HidePrintObjects | Select which kind of objects should not be printed or exported to the image. |
ExportSheetBackgroundImages | If false (the default) then the background images in the sheet won't be exported. Note that Excel doesn't print or export background images, and when it shows them on the screen they look the same no matter the sheet zoom. When you set this to true we will try to export the image, but it will grow and shrink when you zoom, making it look different from what Excel shows. |
PrintRangeLeft | First column to print (1 based). if this or any other PrintRange property is 0, the range will be automatically calculated. |
PrintRangeTop | First row to print (1 based). if this or any other PrintRange property is 0, the range will be automatically calculated. |
PrintRangeRight | Last column to print (1 based). if this or any other PrintRange property is 0, the range will be automatically calculated. |
PrintRangeBottom | Last row to print (1 based). if this or any other PrintRange property is 0, the range will be automatically calculated. |
PageSize | Image page size. Set it to null to use the paper size on the xls file. |
AllowOverwritingFiles | Determines if FlexCel will automatically delete existing image files or not. |
Resolution | "The default resolution on pixels per inch for the rendered images. For the screen, this is 96." |
AllVisibleSheets | If true, All visible sheets on the workbook will be printed. See ResetPageNumberOnEachSheet for behavior of the page number when printing multiple sheets. |
ResetPageNumberOnEachSheet | This property only makes sense when AllVisibleSheets is true. On that case, if this property is true each sheet of the workbook will have the page number reset. For example if the xls file has 2 sheets and each has 3 pages: When ResetPageNumberOnEachSheet = true then footers will look like "Page 1 of 3". If false, they will look like "Page 5 of 6" |
Events
Name | Description |
---|---|
BeforePaint | Fires before drawing the image, allowing to modify it or to modify the XlsFile associated. |
AfterPaint | Fires after the image has been drawn, allowing to modify it. |