It would be beneficial for the clients if every cell has this "cached value" even if the formula can't be evaluated for some reason with the SpreadProcessing - no need for recalculation, just reading the value. It should read the last values while the document was being saved at the originator.
Getting a method like "GetCachedValueString ..." , ideal with the same formatting used for the cell and localization, would be helpful.
string fileName = "file.xlsm";
Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider();
using (Stream input = new FileStream(fileName, FileMode.Open))
{
workbook = formatProvider.Import(input);
}
Optimize font fallback mechanism.
Currently, in NET Standard, if no fonts are provided on PDF export, while resolving the fonts the application falls back to different fonts multiple times for each cell which causes a decrease in performance.
Exception "Format string is not in the correct format" is thrown when importing a file with the following format string: "US$"#,##0.0"m";($#,##0.0)
The exception is thrown in the ValidateDateTimeFormatDescriptor method.
With the current implementation, references like in the following expression cannot be evaluated and are treated as strings: =SUM('C:\Users\Your user name\Desktop\[Workbook_1.xlsx]Sheet1'!A1:B2)
Add support for images embedded in cells.
Similar to clicking "Place in Cell' in MS Excel which embeds the floating image into the cell:
Alternative: Floating Images
Currently, these are the supported image formats:
If we try to import an Excel document containing an image with another format, the following error occurs:
System.Collections.Generic.KeyNotFoundException: 'The given key was not present in the dictionary.'
I am using .net 7. I originally hit it with Telerik.UI.for.Wpf.70.Xaml.2023.3.1114. I updated to Telerik.UI.for.Wpf.70.Xaml.2024.1.423 to see if it was fixed but it still appears to happen.
I have attached a sample program which shows the behavior. Original.xlsm was created in Excel and has an image embedded in cell A1. Call ImportWorkbook with the path to the original file. Then export that workbook (unchanged) to the destination file.
Workbook workbook = ImportWorkbook( originalFileName ); ExportWorkbook( workbook, destinationFileName );
private Workbook ImportWorkbook( string fileName )
{
Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider();
using( Stream input = new FileStream( fileName, FileMode.Open ) )
{
workbook = formatProvider.Import( input );
}
return workbook;
}
private void ExportWorkbook( Workbook workbook, string fileName )
{
Telerik.Windows.Documents.Spreadsheet.FormatProviders.IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsm.XlsmFormatProvider();
using( Stream output = new FileStream( fileName, FileMode.Create ) )
{
formatProvider.Export( workbook, output );
}
}
This would allow repeating header rows on every printed page. More information related to this functionality may be found on the following link: https://support.office.com/en-us/article/Print-rows-with-column-headers-on-top-of-every-page-d3550133-f6a1-4c72-ad70-5309a2e8fe8c
Incorrectly resolved fill between local formatting and cell style.
A fill (fillId) of a cell style (cellStyleXfs) is respected instead of the fill (fillId) of the local formatting (cellXfs).