Class PrintOutClosedExcel
Print-out driver that exports a rendered report metafile to an XLSX workbook using ClosedXML, mapping text and image objects onto worksheet cells by their page position with optional single-sheet output.
Implements
Inherited Members
Namespace: Reportman.Drawing
Assembly: Reportman.Drawing.Excel.dll
Syntax
public class PrintOutClosedExcel : PrintOut, IDisposable
Constructors
View SourcePrintOutClosedExcel()
Constructo and initialization
Declaration
public PrintOutClosedExcel()
Fields
View SourceFileName
Excel filename
Declaration
public string FileName
Field Value
| Type | Description |
|---|---|
| string |
OneSheet
Set this property to force the excel to be conatained only in one sheet
Declaration
public bool OneSheet
Field Value
| Type | Description |
|---|---|
| bool |
Precision
Declaration
public int Precision
Field Value
| Type | Description |
|---|---|
| int |
Methods
View SourceCheckProgress(bool)
Declaration
protected void CheckProgress(bool finished)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | finished |
DrawPage(MetaFile, MetaPage)
Draw all objects of the page to current PDF file page
Declaration
public override void DrawPage(MetaFile meta, MetaPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | MetaFile containing the page |
| MetaPage | page | MetaPage to be drawn |
Overrides
View SourceEndDocument(MetaFile)
The driver should do cleanup here, a print driver should finish print document.
Declaration
public override void EndDocument(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
Overrides
View SourceGetPageSize(out int)
Get page size
Declaration
public override Point GetPageSize(out int indexqt)
Parameters
| Type | Name | Description |
|---|---|---|
| int | indexqt | Output parameters, index for PageSizeArray |
Returns
| Type | Description |
|---|---|
| Point | Page size in twips |
Overrides
View SourceGraphicExtent(MemoryStream, Point, int)
Obtain graphic extent
Declaration
public override Point GraphicExtent(MemoryStream astream, Point extent, int dpi)
Parameters
| Type | Name | Description |
|---|---|---|
| MemoryStream | astream | Stream containing a bitmap or a Jpeg image |
| Point | extent | Initial bounding box |
| int | dpi | Resolution in Dots per inch of the image |
Returns
| Type | Description |
|---|---|
| Point | Size in twips of the image |
Overrides
View SourceNewDocument(MetaFile)
The driver should do initialization here, a print driver should start a print document, while a preview driver should initialize a bitmap
Declaration
public override void NewDocument(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
Overrides
View SourceNewPage(MetaFile, MetaPage)
The driver should start a new page
Declaration
public override void NewPage(MetaFile meta, MetaPage page)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta | |
| MetaPage | page |
Overrides
View SourcePrint(MetaFile)
Generate the excel file
Declaration
public override bool Print(MetaFile meta)
Parameters
| Type | Name | Description |
|---|---|---|
| MetaFile | meta |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourcePrintObject(IXLWorksheet, MetaPage, MetaObject, int, int, SortedList, SortedList, string, int, int, double)
Declaration
public static void PrintObject(IXLWorksheet sh, MetaPage page, MetaObject obj, int dpix, int dpiy, SortedList rows, SortedList columns, string FontName, int FontSize, int rowinit, double Precision)
Parameters
| Type | Name | Description |
|---|---|---|
| IXLWorksheet | sh | |
| MetaPage | page | |
| MetaObject | obj | |
| int | dpix | |
| int | dpiy | |
| SortedList | rows | |
| SortedList | columns | |
| string | FontName | |
| int | FontSize | |
| int | rowinit | |
| double | Precision |
SetPageSize(PageSizeDetail)
Sets page size
Declaration
public override Point SetPageSize(PageSizeDetail psize)
Parameters
| Type | Name | Description |
|---|---|---|
| PageSizeDetail | psize | Input value |
Returns
| Type | Description |
|---|---|
| Point | Size in twips of the page |
Overrides
View SourceTextExtent(TextObjectStruct, Point)
Obtain text extent
Declaration
public override Point TextExtent(TextObjectStruct aobj, Point extent)
Parameters
| Type | Name | Description |
|---|---|---|
| TextObjectStruct | aobj | |
| Point | extent |
Returns
| Type | Description |
|---|---|
| Point |