An InvalidOperationException could be thrown in multi-threaded export to XLSX format. However, the problem is not verified. Here is the stacktrace: ERROR System.InvalidOperationException: isParsing must be true. at Telerik.Windows.Documents.Spreadsheet.Utilities.Guard.ThrowExceptionIfTrue(Boolean param, String paramName) at Telerik.Windows.Documents.Spreadsheet.Model.Printing.HeaderFooterSectionTextParser.OnBeforeParse(String headerFooterSectionText) at Telerik.Windows.Documents.Spreadsheet.Model.Printing.HeaderFooterSectionTextParser.Parse(String headerFooterSectionText) at Telerik.Windows.Documents.Spreadsheet.Model.Printing.HeaderFooterSectionTextSanitizer.Sanitize(String sectionText) at Telerik.Windows.Documents.Spreadsheet.Model.Printing.HeaderFooterContent.BuildContentText() at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.HeaderFooterElement.WriteChild[T](OpenXmlChildElement`1 child, HeaderFooterContent content) at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.HeaderFooterElement.WriteChildren(HeaderFooterSettings settings) at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.HeaderFooterElement.OnBeforeWrite(IXlsxWorksheetExportContext context) at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.Model.Elements.Worksheets.WorksheetElementBase.OnBeforeWrite(IXlsxWorkbookExportContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase`3.OnBeforeWrite(IOpenXmlExportContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Write(IOpenXmlWriter writer, IOpenXmlExportContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Elements.OpenXmlElementBase.Write(IOpenXmlWriter writer, IOpenXmlExportContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Model.Parts.OpenXmlPartBase.Export(IOpenXmlWriter writer, IOpenXmlExportContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Export.OpenXmlExporter`2.ExportPart(OpenXmlPartBase part, TContext context) at Telerik.Windows.Documents.FormatProviders.OpenXml.Export.OpenXmlExporter`2.Export(Stream output, TContext context, OpenXmlExportSettings settings) at Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider.ExportOverride(Workbook workbook, Stream output) at Telerik.Windows.Documents.Spreadsheet.FormatProviders.WorkbookFormatProviderBase.Export(Workbook workbook, Stream output) Available in LIB Version 2017.2.828.
When a csv is exported the entire range which has values is exported. When export is done in Excel, the cells of this range which are empty are marked by an additional field, separated by a comma. This comma is present in SpreadProcessing only in places where it is obligatory for example in the middle of the row. Obligatory comma in this context means that without it the file will not be read correctly by Excel or SpreadProcessing. In places where it is not obligatory, like in an empty row or in the end of the row, it is skipped. These non-obligatory commas do not influence how the file will be interpreted by Excel, however, according to the most-popular csv spec, they should be present, which means that there could be parsers which are unable to parse the resulting file. (2.4 Each line should contain the same number of fields throughout the file.) Example: Exported by Excel: --------------------------------------- Product,Unit Price,Units in Stock,Discontinued Chai,$18.00 ,39, Chang,,17, Chef Anton's Cajun Seasoning,$22.00 ,53,No ,,, Chef Anton's Gumbo Mix,$21.35 ,0,No --------------------------------------- Exported by SpreadProcessing: --------------------------------------- Product,Unit Price,Units in Stock,Discontinued Chai,$18.00 ,39 Chang,,17 Chef Anton's Cajun Seasoning,$22.00 ,53,No Chef Anton's Gumbo Mix,$21.35 ,0,No --------------------------------------- Note the extra commas in the empty row and in the end of the first two rows in the SpreadProcessing sample.
RIGHT returns the last character or characters in a text string, based on the number of characters you specify. 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
When iterating through the rows and cells of an imported Worksheet in at least one of the rows GetValue().Value.ResultValueType for a number cell is set to GetValue().Value.ResultValueType.Text and the value to "error" or "string". For us this happens in a worksheet with 200 rows max. and columns formated as date, time, time followed by some text and number columns. In our Tests with different excel files it allways happened once (between line 11 and 16) and only for the first two columns. Exporting the worksheet back into a new excel file will show all rows and columns types and values OK.
Excel provides an option to choose whether cells with number cell value zero should display as "0" or as if they are empty. The option can be found in File -> Options -> Advanced -> "Show a zero in cells that have zero value". The option is set per sheet. The XML attribute is called "zeroValues" and it can be found on page 1625 in the format specification.
When the automatic scaling options FitToColumns and FitToRows are used, the vertical and horizontal breaks, respectively, should be ignored. Workaround: Remove the page breaks if the worksheet uses automatic scaling and restore them if necessary: public void ExcelToPdf(string path) { var provider = new XlsxFormatProvider(); using (Stream input = File.OpenRead(path)) { var workbook = provider.Import(input); this.CachePageBreaks(workbook); var pdfProvider = new PdfFormatProvider(); pdfProvider.ExportSettings = new PdfExportSettings(ExportWhat.EntireWorkbook, false); using (Stream output = File.Open(@"C:\Users\velcheva\Desktop\26293903-c650-4d28-adee-58a542651f72_exceltopdf\exported.pdf", FileMode.Create)) { pdfProvider.Export(workbook, output); } this.RestorePageBreaks(workbook); } } private Dictionary<Worksheet,List<PageBreak>> verticalPageBreaksCache; private void CachePageBreaks(Workbook workbook) { this.verticalPageBreaksCache = new Dictionary<Worksheet, List<PageBreak>>(); foreach (Worksheet worksheet in workbook.Worksheets) { WorksheetPageSetup pageSetup = worksheet.WorksheetPageSetup; if (pageSetup.FitToPages) { this.verticalPageBreaksCache[worksheet] = new List<PageBreak>(pageSetup.PageBreaks.VerticalPageBreaks); if(pageSetup.FitToPagesWide != 0) { List<PageBreak> breaksToRemove = new List<PageBreak>(); breaksToRemove.AddRange(pageSetup.PageBreaks.VerticalPageBreaks); breaksToRemove.ForEach((br) => pageSetup.PageBreaks.TryRemoveVerticalPageBreak(0, br.Index)); } // Record the horizontal page breaks if necessary. } } } private void RestorePageBreaks(Workbook workbook) { foreach (Worksheet worksheet in workbook.Worksheets) { WorksheetPageSetup pageSetup = worksheet.WorksheetPageSetup; if (pageSetup.FitToPages) { List<PageBreak> cachedbreaks = this.verticalPageBreaksCache[worksheet]; if (pageSetup.FitToPagesWide != 0) { foreach (var pageBreak in cachedbreaks) { pageSetup.PageBreaks.TryInsertVerticalPageBreak(0, pageBreak.Index); } } // Restore the horizontal page breaks if necessary. } } }
When a format code like "General" x"" is applied on e.g. 1, the result is "1 x". At the moment, the result with Spreadprocessing is "General x"
Most often, the print area will be defined in the Workbook part like so: <definedName name="_xlnm.Print_Area" localSheetId="3">Data!$A$1:$L$7</definedName> Sometimes, however, it can be a function instead: <definedName name="_xlnm.Print_Area" localSheetId="0">OFFSET('Parametrový List'!$A$1,0,0,INDEX({77,148},PocetStran),34)</definedName> At the moment, the second option is not supported.
When the workbook contains multiple styles (e.g. 50000), the import is extremely slow. MS Excel loads this document instantaneously.
Closed as duplicate. Please, follow the item at https://feedback.telerik.com/Project/184/Feedback/Details/190249 .
The row declaration is the following: <row r="8" spans="1:18" ht="15.75" x14ac:dyDescent="0.25"> The dyDescent attribute is described as follows: The dyDescent attribute is a double attribute, as specified in [XMLSCHEMA2/2] section 3.2.5, that specifies the vertical distance in pixels from the bottom of the cells in the current row to the typographical baseline of the cell content if, hypothetically, the zoom level for the sheet containing this row is 100 percent and the cell has bottom-alignment formatting. See section 2.2.4.12 for how this element integrates with the Office Open XML file formats specified in [ISO/IEC29500-1:2016]. The dyDescent attribute has a side effect; it sets the customHeight attribute to true even if the customHeight attribute is explicitly set to false. Note: Since the dyDescent attribute is not implemented, the height is not recognized to be custom and therefore it is not imported at all. The row has the default height.
When the worksheet contains fraction numbers with fractional parts > 0.5 and < 0.5 and both these numbers have fraction format applied, the number with fractional part < 0.5 will have incorrect whole part.
Add support for Hidden and Empty Cells options:
https://support.office.com/en-us/article/display-empty-cells-null-n-a-values-and-hidden-worksheet-data-in-a-chart-a1ee6f0c-192f-4248-abeb-9ca49cb92274
Setting SetIsBold method to true on a CellSelection, resets the font size of those cells to 11 points.
See the generated file of the attached program.
Cells C1:F1 have font size 11 instead of expected 9.
PS: Is it really necessary to have a support plan to report bugs?