#N/A is shown in both the excel template and the pdf generated from it


#1

I am trying to generate a PDF from excel template. When I open the excel template from MS Excel and simply save it and generate the PDF then the Value appears in both PDF and excel Template . But without opening the same template when I try to create PDF then in place of value, #N/A appears in both pdf and excelTemplate(see 12th row of Staging sheet in excelTemplate.xlsx).

Steps to follow:
Without opening the excel file(excelTemplate.xlsx) attached here try to generate the PDF then, #N/A appear in PDF.
Open the template and simply save it and try to generate PDF then, value appears in PDF.
Code used:
Workbook workbook = new Workbook(io);
workbook.calculateFormula();
workbook.save(“myresult.pdf”); // i have used Display sheet of excelTemplate.xlsx to generate pdf
The excel file is attached with this post resourceUsed.zip (103.9 KB)
(14.4 KB)
in zip format


#2

@Amjad_Sahi,

Can you please check this.


#3

@niteshregmi1234,

Thanks for the template file.

I do not think if this is an issue with Aspose.Cells APIs by any means or even the issue is linked with the APIs. I opened your template file into Ms Excel 2007/2013 manually and check the row, it gives same error “#N/A” value into those cells, I even calculate the formulas again and again (I also double clicked in the row cells and pressed enter, etc. but the value is not changed). See the screenshot for your reference:

I then re-saved the file with new file name, the value is not changed too. Then I re-saved to PDF file format (the PDF remains the same as per the original file with those “#N/A” error values in that row).

In short, this is not an issue with Aspose.Cells. I guess there is something wrong with your template file especially with formula references. If you still think it is an issue with Aspose.Cells APIs, kindly provide more details and steps involved on how we can see MS Excel behaves different than Aspose.Cells rendered PDF file format, we will check it soon.


#4

@Amjad_Sahi

Amjad, can you please open that template from MS Excel 16.365. We are seeing values in place of #N/A. This seems like there is issue from MS excel 2007 and 2013.


#5

@niteshregmi1234,
Yes, you are right that it shows proper value when opened in Excel 16.
We were able to observe the issue but we need to look into it more. We have logged the issue in our database for investigation and for a fix. Once, we will have some news for you, we will update you in this topic.

This issue has been logged as

CELLSJAVA-42971 – N/A is shown in the rendered PDF

#6

Thanks @ahsaniqbalsidiqui,

We will be following this thread for the fix.


#7

@niteshregmi1234,
You are welcome.


#8

@niteshregmi1234,

We have fixed some issues of calculating formulas in your template file. However, because of bugs in old JDK versions for processing IEEE 754 double values, to calculate all formulas correctly with the coming fix (we will share the Download link in the next few days), JDK1.8 or later versions are required.


#9

@niteshregmi1234,

Please try our latest version/fix: Aspose.Cells for Java v19.7.4 (attached)

Your issue should be fixed in it.

Let us know your feedback.

aspose-cells-19.7.4.zip (6.6 MB)


#10

@Amjad_Sahi
Thanks for the updated jar. We will check and will notify you.


#11

@niteshregmi1234,

Please take your time to evaluate the fix for your scenario, hopefully it will pass your test cases.


#12

The issues you have found earlier (filed as CELLSJAVA-42971) have been fixed in Aspose.Cells for Java v19.8. This message was posted using BugNotificationTool from Downloads module by ahsaniqbalsidiqui