Hi,
I am currently using 7.2.2.1 version.
I have two problem.
One of them is about Aspose.Cells.CellException.I attached sample file for u (PI-AS-PB3-010_2)
When I use workbook.Save method I am giving Aspose.Cells.CellExceptionAspose.Cells.CellException and Excel says that file has unreadable content.(I am using pageSetup.PrintArea property.Maybe it can help u to understand problem).
The other one is,after converting my excel file to pdf,Pdf document has black areas.I attached sample file for u(WI-AA-001).
Could you please check them
Ok my codes are here,
Workbook workbook = new Workbook();
workbook.Open(su.MapPath("../../QDMSFiles/TEMPFOL/") + test.xlsx);
foreach (Worksheet sheet in workbook.Worksheets)
{
int maxCol = sheet.Cells.MaxDisplayRange.ColumnCount - 1;
int maxRow = sheet.Cells.MaxDisplayRange.RowCount - 1;
if (maxCol > 0 && maxRow > 0)
{
Aspose.Cells.PageSetup pageSetup = sheet.PageSetup;
pageSetup.PrintArea = "A1:" + CellsHelper.CellIndexToName(maxRow, maxCol);
}
}
workbook.Settings.DisplayDrawingObjects = Aspose.Cells.DisplayDrawingObjects.DisplayShapes;
Aspose.Cells.PdfSaveOptions opts = new Aspose.Cells.PdfSaveOptions();
opts.OnePagePerSheet = true;
workbook.Save(su.MapPath("../../QDMSFiles/TEMPFOL/") + "test.pdf", opts);
Hi,
Thanks for sharing the code.
It looks Aspose.Cells has issues for your template file to simply render to PDF. I got the error when trying to convert your template file "PI-AS-PB3-010_2.xlsx" to PDF. Sample code: Workbook workbook = new Workbook("e:\\test2\\PI-AS-PB3-010_2.xlsx"); foreach (Worksheet sheet in workbook.Worksheets) { int maxCol = sheet.Cells.MaxDisplayRange.ColumnCount - 1; int maxRow = sheet.Cells.MaxDisplayRange.RowCount - 1; if (maxCol > 0 && maxRow > 0) { Aspose.Cells.PageSetup pageSetup = sheet.PageSetup; pageSetup.PrintArea = "A1:" + CellsHelper.CellIndexToName(maxRow, maxCol); } } workbook.Settings.DisplayDrawingObjects = Aspose.Cells.DisplayDrawingObjects.DisplayShapes; //These are the culprit lines of code. Aspose.Cells.PdfSaveOptions opts = new Aspose.Cells.PdfSaveOptions(); opts.OnePagePerSheet = true; workbook.Save("e:\\test2\\PI-AS-PB3-010_2.pdf", opts); //Error
I have logged a ticket with an id: CELLSNET-40804. We will look into it.
Thank you.
Hi,My problem 40804 seems as resolved.Do you have any improvement about this problem.
Hi,
We have fixed the mentioned issue but will release a fix soon either today or in next 1~2 working days after some additional testing.
Hi,
Please download and try the latest fix: Aspose.Cells for .NET v7.2.2.5 and let us know your feedback.
Do you have any improvement about CELLSNET-40802.
Hi,
I can still see the problem, so your issue is not fixed yet. I have asked the relevant developer to update or provide an eta for it. Once we have any update on it, we will let you know here immediately.
Thank you.
Hi,
Thanks for using Aspose.Cells.
Please download and try this fix: Aspose.Cells for .NET v7.3.0.3
There is a special formula in the worksheet[0] of “PI-AS-PB3-010_2.xlsx”
Please use following code to solve issue:
C#
workbook.CalculateFormula();
workbook.Worksheets[0].Shapes.UpdateSelectedValue();