Unplanned
Last Updated: 18 Feb 2021 10:44 by ADMIN
Coastal IT
Created on: 18 Feb 2021 10:43
Category: SpreadProcessing
Type: Bug Report
3
SpreadProcessing: Empty cells with format are printed or exported to PDF

When the spreadsheet contains empty rows and the format of some cells is set the rows are still exported to pdf or printed.  

To workaround this set the print area with the following code:

IPropertyDefinition[] propertyDefinitionsAffectiingPringing = new IPropertyDefinition[] { CellPropertyDefinitions.ValueProperty };
CellRange usedCellRange = workbook.Worksheets[0].GetUsedCellRange(propertyDefinitionsAffectiingPringing);

workbook.Worksheets[0].WorksheetPageSetup.PrintArea.SetPrintArea(usedCellRange);

 

0 comments