When a SpreadsheetML file contains an array formula it is not converted properly (formula is there but you would need to edit the cell and hit Ctrl-Shift Enter) when converting to a 97-2003 or a Xslx but calculates correctly when converting to PDF.
Hi,
Hi,
//Instantiate LoadOptions specified by the LoadFormat.LoadOptions loadOptions = new LoadOptions(LoadFormat.SpreadsheetML);//Create a Workbook object and opening the file from its pathWorkbook wb = new Workbook("K://B1.xml", loadOptions);//Calculate formulawb.CalculateFormula();//Save as Xlswb.Save("K://Book1.xls");//Save as Xlsxwb.Save("K://Book1.xlsx");//Save as PDFwb.Save("K://Book1.pdf");
Hi,
Thanks for the quick response. Here's the code reworked (originally loaded from a stream and saved to a HttpResponse object) and I've attached the original XML along with the PDF and Excel 2007 files after conversion as well.
Thanks again.
static void Main( string[] args )
{
string path = "c:\\doc\\";
//Aspose.Cells.License license = new Aspose.Cells.License();
//license.SetLicense("Aspose.Total.lic");
Aspose.Cells.LoadOptions xl_load_options = new Aspose.Cells.LoadOptions(Aspose.Cells.LoadFormat.SpreadsheetML);
//Original load
//Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(this._stream, xl_load_options);
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(path + "uwtemplate.xml", xl_load_options);
wb.CalculateFormula();
wb.Worksheets[0].ViewType = Aspose.Cells.ViewType.PageBreakPreview;
wb.Worksheets[0].Zoom = 90;
Aspose.Cells.SaveOptions options = new Aspose.Cells.OoxmlSaveOptions(Aspose.Cells.SaveFormat.Xlsx);
wb.Save(path + "uwtemplate.xlsx", options);
options = new Aspose.Cells.XlsSaveOptions(Aspose.Cells.SaveFormat.Excel97To2003);
wb.Save(path + "uwtemplate.xls", options);
options = new Aspose.Cells.PdfSaveOptions(Aspose.Cells.SaveFormat.Pdf);
wb.Save(path + "uwtemplate.pdf", options);
//Original Save
//wb.Save(this._context.Response, this._file_name, Aspose.Cells.ContentDisposition.Attachment, options);
}
Hi,
Hi,
We have fixed this issue. Please download and try the latest version: Aspose.Cells for .NET v7.2.2.3
The issues you have found earlier (filed as CELLSNET-40799) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.