I generate an Excel file with some formatting applied (Header in bold and no grid lines)For some reason when I save thru Workbook, all the formatting disappears
_currentWorkbook.Save(_FileName, new XlsSaveOptions(SaveFormat.Excel97To2003));
return _FileName;
Before saving, _FileName has path to Excel file with proper formatting.
But once workbook has been saved, all the formatting is gone.
Hi,
Please try our latest version/fix: Aspose.Cells for .NET v7.2.2.1If you still finds the issue, kindly do provide your template files (input if you have and output file). Also share complete runnable code (sample console application preferably) to reproduce the issue. We will check your issue soon.
thank you.
Hi Amjad,
I have tried the new version of Cells but didn't work out.
So I have attached the complete application that saves "test.xls" to "test-output.xls" under "bin\debug" folder.
Excel file is included in the project as "test.xls".
Hi,
I have checked your so called template file “test.xls”, it is actually a web page / html file and not the native Excel file (for confirmation, you may open it into notepad if it is a web page). MS Excel will prompt an error when you open it into it.
Anyways, I think you may try to add a line to your code, it may work for your needs.
e.g
const string fileName = “test.xls”;
const string newFileName = “test-output.xls”;
_currentWorkbook = new Workbook(fileName);
_currentWorkbook.Worksheets[0].AutoFitColumns();
_currentWorkbook.Save(newFileName);
Also, the gridlines are not printed by default, so if you open the output file into MS Excel, the gridlines are not visible in the print preview.
Thank you.
Thank you Amjad.
When I save using Application.Excel(actual Excel 2010), it saves without removing formattings.
But when I use Aspose, it saves differently. Is this an intended behavior or a feature planned for later on?
Thanks.
Hi,
We have fixed this issue.
Please download and try this fix: Aspose.Cells for .NET
v7.3.0.1
The issues you have found earlier (filed as CELLSNET-40771) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.