Some of the leftmost borders are omitted when exported to PDF.
One of the options grouped under alignment is Shrink to Fit. Shrink to fit will automatically reduce the font size until text fits in a cell.
When a workbook (xlsx) contains a worksheet where some of the columns have width, bigger than the value written in the SpreadsheetDefaultValues (2000) an exception during the import is thrown.
ArgumentException with clarification similar to "'\u001f', hexadecimal value 0x1F, is an invalid character." is thrown when trying to export document containing characters which are not supported in XML document - such as some control characters like 0x00, 0x1F, 0x1B, etc. Such characters are described in the XML specification here: https://www.w3.org/TR/xml/#charsets. Although the escaped strings are not supported (see https://feedback.telerik.com/Project/184/Feedback/Details/190228 ), the library could prevent the exception and export the document successfully by skipping such characters. Workaround: remove such characters before the export. Check the following StackOverflow answer for some ideas on code for replacing the characters: http://stackoverflow.com/a/14323524/259206 Fix available in R3 2018 SP1 release.
Such objects are defined as oleObject elements in the XML. Currently, they are skipped on import.
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);
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."
Provide an option to change the display mode of the Worksheet to right-to-left.
Implement SMALL function (https://support.office.com/en-us/article/SMALL-function-17da8222-7c82-42b2-961b-14c45384df07 ), which returns k-th smallest value from a range: SMALL(array, k) Workaround: This could be implemented as a custom function: http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/features/formulas/custom-functions.html
Generating document which consists of merged cells in a row and some values then inserting a row on the top and then exporting the document or setting it to the RadSpreadsheet causes wrong merged cells. If the generation is done on a workbook which is already set to the RadSpreadsheet everything is OK. Workaround: The document can be exported and then imported again before the row is inserted.