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);
From the OOXML Specification: A comment is a rich-text note that is attached to and associated with a cell, separate from other cell content.
In Office 365 there are two types of comments:
This item applies to Comments/Notes only.
For Threaded Comments, please follow: SpreadProcessing: Comments (Threaded Comments)
When opening an Xlsx file with conditional formatting I get an Exception:
"System.ArgumentNullException: 'Value cannot be null. (Parameter 'formatting')'
at Telerik.Windows.Documents.Spreadsheet.Model.ConditionalFormattings.ConditionalFormattingDxfRule..ctor(DifferentialFormatting formatting)
at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.ConditionalFormattingRuleElement.GetRule(DifferentialFormatting formatting)
at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.ConditionalFormattingRuleElement.OnAfterRead(IXlsxWorksheetImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.ReadChildElements(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Read(IOpenXmlReader reader, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.ImportPartFromArchive(ZipArchiveEntry zipEntry, PartBase part, IOpenXmlImportContext context)
at Telerik.Windows.Documents.FormatProviders.OpenXml.OpenXmlImporter`1.Import(Stream input, IOpenXmlImportContext context)
at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider.ImportOverride(Stream input)
at WpfApp1.MainWindow.StartExcel() in C:\Users\larse\source\repos\WpfApp1\MainWindow.xaml.cs:line 49"
To quote my colleage: "After dissecting the Excel template file, I have isolated what is causing the issue. If conditional formatting is used to disable cell boarders it results in the error, if the conditional formatting is updated to turn the necessary borders white, instead of disabling the report exports correctly, the following screenshot also explains."
Some functions are exported from Excel with the _xlfn. prefix as compatibility measure with older versions of MS Excel (future functions, see here https://msdn.microsoft.com/en-us/library/dd907480(v=office.12).aspx , https://support.office.com/en-ca/article/Issue-An-xlfn-prefix-is-displayed-in-front-of-a-formula-882f1ef7-68fb-4fcd-8d54-9fbb77fd5025 ) RadSpreadProcessing do not support these and the spreadsheet treats the function as not supported even when it is. Example: <row r="1" spans="2:2" x14ac:dyDescent="0.25"> <c r="B1" t="b"> <f>_xlfn.ISFORMULA(C2)</f> <v>0</v> </c> </row> This could be observed with the ISFORMULA function.
At this point the culture used by RadSpreadProcessing (in the FormatHelper and internally in SpreadsheetCultureHelper) is determined by the current thread culture on startup. Provide ability to: - to change the culture at runtime. Currently, when the thread culture is changed, RadSpreadProcessing is "stuck" with the original one. - set this culture independently of the current thread's one.
Implement export to XPS file format.
Add support for MID function. MID returns a specific number of characters from a text string, starting at the position you specify, based on the number of characters you specify. MID(text, start_num, num_chars) A list of the supported functions is available at http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/formulas/functions This function can be implemented as a custom function. Check the following resources for more details on how to achieve that: - http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/formulas/custom-functions - https://github.com/telerik/xaml-sdk/tree/master/Spreadsheet/WPF/CustomFunctions
Add support for ROW function: https://support.office.com/en-us/article/ROW-function-3a63b74a-c4d0-4093-b49a-e76eb49a6d8d?ui=en-US&rs=en-US&ad=US Examples: =ROW() returns the row in which the formula appears =ROW(C10) returns the row of the reference - 10 Workaround: This could be implemented as a custom function: http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/formulas/custom-functions.html
When the column width is not an integer number, but a decimal fraction one, the width which is exported is not calculated correctly. For example, if there is a cell with some text and its column's width is autofit, it's exported with different actual width. In addition, if the exported xlsx file is imported back in the Spreadsheet, the column width is a bit different from the one which was exported (only for the first export-import roundtrip).
If shape extent is declared, the two cell anchor points for the drawing element are ignored. For example if the TwoCellAnchorElement's from and two points declare that the image should be anchored starting from cell A1to F10 and further in the drawing declaration there is defined extents element with image size values, anchor element's points are ignored.