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.
Closed as duplicate. Please, follow the item at https://feedback.telerik.com/Project/184/Feedback/Details/190249 .
When the workbook contains multiple styles (e.g. 50000), the import is extremely slow. MS Excel loads this document instantaneously.
Incorrect calculation of Round function returns wrong results in some cases. For example, test Microsoft Excel and Spreadsheet results of: ROUND(1.365, 2) to see the discrepancy. Available in R3 2018 SP1 release.
When inserting cells a check is performed for data loss. This check should take into account the value property, but should not take into account properties like cell value format and data validation. Workaround: clear the values at the end of the worksheet before inserting cells. worksheet.Cells[1048575, 0, 1048575, 16383].ClearDataValidationRule();
When the scale factor of a document is smaller, the borders don't seem to scale correctly when exported to PDF. They appear much thicker than they would when exported from Excel.
When a worksheet has name that has spaces and a hyperlink to this worksheet is being inserted in Excel, quotes are used to surround the name (ex: 'Sheet 12'!A1) for a valid hyperlink. If quotes are not added, the hyperlink is invalid. In RadSpreadsheet, it is the opposite: (Sheet 12!A1 is correct, while 'Sheet 12'!A1 is incorrect). Thus, opening such an exported document from RadSpreadsheet in Excel loads it with incorrect hyperlinks; and importing such an Excel document in RadSpreadsheet loads it with incorrect hyperlinks. A way to workaround this issue is to modify the hyperlinks on import/export from/to RadSpreadsheet. You can find attached a project demonstrating this approach.
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.
The OFFSET function returns a reference to a range that is a specified number of rows and columns from a cell or range of cells.
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"
Having cell with custom format string set to "MMM" does not apply correctly. Instead of showing the date in the defined format (for instance "Aug"), what actually is displayed is "MMM".
The format string for dates should be in lowercase so they can work as expected. Ensure this in the internal logic.
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 the worksheet contains many formulas which use large ranges (e.g. covering 50000 cells) as arguments and these formulas have to be calculated, this causes OutOfMemoryException.
The named ranges need to be translated when used in a certain cell just like the data validation rules. WORKAROUND: When you use RowSelection.Insert() method, for instance, after the row insertion you may iterate all defined names in the document. Parse their RefersTo property and if it is affected by the insertion, delete and recreate the DefinedName in the corresponding NameCollection by updating the RefersTo text value. Sample code for parsing the RefersTo property may be seen in the description of this feedback item: https://feedback.telerik.com/Project/184/Feedback/Details/190061-spreadprocessing-add-api-to-get-the-list-of-ranges-to-which-a-defined-name-refer
Such objects are defined as oleObject elements in the XML. Currently, they are skipped on import.
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 values that were copied have formatting both on the cell and on the column, the pasted values get the formatting of the column, instead of that of the cell. The same applies to rows.
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.
KeyNotFoundException is thrown on import. The number formats with id 5, 6, 7 and 8 are missing in the built-in number formats. Available in R2 2018 Official Release version.