Hi,
I’m using Aspose Cells 22.1
When I convert a sample from xls to pdf, I get data loss. I tried updating to the latest version but still getting the same issue.
After conversion, the rows contain hyperlink is missing.
Here is my current code:
using(var workbook = new Aspose.Cells.Workbook(inFile))
{
workbook.AcceptAllRevisions();
workbook.Save(outFile, SaveFormat.Pdf);
}
Please help investigate this issue. Thanks!
image.png (62.3 KB)
Sample.zip (196.5 KB)
@dunghnguyen,
Please notice, I am able to reproduce the issue as you mentioned by converting your template file to PDF using your code segment. I noticed some data loss after conversion from XLS to PDF file format. The output PDF is not matched with the input Excel file when viewing the sheet in print preview in MS Excel manually. I have logged a ticket with an id “CELLSNET-50568” for your issue. We will look into it soon.
Once we have an update on it, we will let you know here.
@dunghnguyen
The cached data is not right for the Cell with formula. Please use workbook.CalculateFormula();
to recalculate the data, it will be OK.
Code:
using(var workbook = new Aspose.Cells.Workbook(inFile))
{
workbook.AcceptAllRevisions();
workbook.CalculateFormula();
workbook.Save(outFile, SaveFormat.Pdf);
}