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 );
}
}
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);
}
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.'
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.
In Excel this can be achieved by right click on the axis, then from the context menu select "Format Axis". Go to the "Text Options" tab and "Text Box" group and then in the "Custom angle" field insert the desired value.
Error bars in charts you create can help you see margins of error and standard deviations at a glance. They can be shown on all data points or data markers in a data series as a standard error amount, a percentage, or a standard deviation. You can set your own values to display the exact error amounts you want.
ArgumentNullException is thrown when importing a document containing a rule with no set format.
Some fonts are not measured correctly by RadTextMeasurer.
trying to open the attached workbook with this code:
Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
using (Stream input = File.OpenRead("sample.xlsx"))
{
var provider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();
// The import method enables you to also pass a byte[] with the XLSX document data
workbook = provider.Import(input, TimeSpan.FromSeconds(30));
}
I get an unhandled exception:
An unhandled exception of type 'System.ArgumentNullException' occurred in Telerik.Documents.Spreadsheet.dll
Value cannot be null.
Any idea what's going on?
Thank you for your time,
Phil
Apply Note style:
Set None Fill: