Hi,
Our customer sees an error when Aspose is used, but there’s no error when the file is open in Excel.
Please see attached file: Test_Formula_Aspose.xlsx.zip (8 KB)
Formula calculated in Aspose:
Screen Shot 2018-08-22 at 14.27.23.png (13.9 KB)
Opened in Excel:
Screen Shot 2018-08-22 at 14.26.22.png (4.1 KB)
Sample code:
using System;
using System.IO;
using Aspose.Cells;
using Aspose.Cells.Rendering;
namespace AsposeTest
{
class Program
{
static void Main(string[] args)
{
var book = new Workbook(@"C:\temp\Test_Formula_Aspose.xlsx");
book.CalculateFormula();
var frontend = book.Worksheets["frontend"];
frontend.CalculateFormula(true, false, null);
// Get cell --> for debugging
var cell = frontend.Cells["C15"];
Console.WriteLine(cell.Value);
// Or save as SVG --> real use scenario
// var imgOptions = new ImageOrPrintOptions
// {
// OnePagePerSheet = true,
// PrintingPage = PrintingPageType.IgnoreBlank,
// SaveFormat = SaveFormat.SVG
// };
//
// var imgStream = new MemoryStream();
// var render = new SheetRender(frontend, imgOptions);
// render.ToImage(0, imgStream);
// imgStream.Seek(0, SeekOrigin.Begin);
//
// using (var file = File.Create(@"C:\temp\out.svg"))
// {
// imgStream.CopyTo(file);
// }
}
}
}
Best regards,
Pavlo