Method RenderRange
- Namespace
- DocWright.Spreadsheet.Rendering
- Assembly
- DocWright.Spreadsheet.Rendering.dll
RenderRange(XlsxDocumentSheet, XlsxCellRange, int)
Draws one range of a sheet as a PNG exactly as large as its cells, with the grid the sheet shows on screen.
public byte[] RenderRange(XlsxDocumentSheet sheet, XlsxCellRange range, int dpi = 96)
Parameters
sheetXlsxDocumentSheetThe sheet.
rangeXlsxCellRangeThe range.
dpiintThe resolution, in dots per inch of the printed size; 96 by default.
Returns
- byte[]
The PNG.
Exceptions
- ArgumentNullException
sheetis null.- ArgumentOutOfRangeException
dpiis not positive.- InvalidDocumentException
A part of the workbook the layout reads is malformed.
- ResourceLimitExceededException
The range is more rows and columns, or the image more pixels, than the limits allow.