Sometimes leading minus sign in a cell with text is treated as a formula.
A possible workaround is to remove the minus sign or to replace it with some other symbol.
Use the code to import a sample txt file containing a "+" sign in a cell value:
Workbook workbook;
Telerik.Windows.Documents.Spreadsheet.FormatProviders.IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.TextBased.Txt.TxtFormatProvider();
using (Stream input = new FileStream(@"sample.txt", FileMode.Open))
{
workbook = formatProvider.Import(input);
}
Expected behavior: the file is imported successfully
Actual behavior: an error is thrown
XIRR function returns the internal rate of return for a schedule of cash flows that is not necessarily periodic. To calculate the internal rate of return for a series of periodic cash flows, use the IRR function.
https://support.microsoft.com/en-gb/office/xirr-function-de1242ec-6477-445b-b11b-a303ad9adc9d
Import an XLSX document and auto-fit the columns. Then, export the document to XLSX format.
Even though a SpreadFixedTextMeasurer is applied and a FontProvider is implemented, the columns are not wide enough to fit the content:
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).
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.