Convert Excel to PDF with Aspose.Cells Cloud API is not evaluating formulas correctly

We are using the cloud cells api at http://api.aspose.com/v1.1/cells/


The attached xlsx file (zip extension added) produces the attached PDF file. Note that #VALUE is displayed in multiple locations in the PDF file. The formulas evaluate correctly in the xlsx file. Note that the formulas depend on values in the B and C columns which are hidden.

We are using the following options:

&isAutoFitRows=true

true
true
false
None
400
95
false
Pdf

Hi,

Thanks for providing us template file and details.

I have tested your scenario/ case using your template Excel file with your specified (xml) options, it works fine and I could not spot the issue with the output PDF file (attached). Could you try it again now.

e.g

Sample code:


string xml = @"

true

true

false

None

400

95

false

Pdf

";

//build URI

string strURI = “http://api.aspose.com/v1.1/cells/Vessel_Position_Report-AM-Report-02-17-2017-CALUSA-COAST.xlsx/saveAs?newfilename=out1pdf.pdf&isAutoFitRows=true”;

//sign URI

string signedURI = Sign(strURI);

POST(signedURI, xml);

//build URI

strURI = “https://api.aspose.com/v1.1/storage/file/out1pdf.pdf”;

signedURI = Sign(strURI);

using (HttpWebResponse response = GET(signedURI))

{

using (var stream = File.Create(@“e:\test2\out1.pdf”))

{

response.GetResponseStream().CopyTo(stream);

}

}

Let us know if you still have this issue.

Thank you.

Thanks. After a little more checking, it looks like this file is actually what was uploaded to http://api.aspose.com/v1.1/storage/file.


Could you check this file as well? In preview it shows the #VALUE!, but as soon as you click Enable Editing, the formulas all calculate correctly.


Hi,


Thanks for the new file.

I again tested your scenario/case using your newly attached file, it still works fine. Please find attached the output PDF file which does not have “#VALUE!” error against the calculated formulas results.

Thank you.

That is strange.

Here is the url to the template file in your system (left off the appSID and signature parameters):
http://api.aspose.com/v1.1/storage/file/Vessel_Position_Report-AM-Report-02-17-2017-CALUSA-COAST_6306542.xlsx

We called the cells api with the configuration described in my first post:
http://api.aspose.com/v1.1/cells/Vessel_Position_Report-AM-Report-02-17-2017-CALUSA-COAST_6306542.xlsx/saveAs?newfilename=Vessel_Position_Report-AM-Report-02-17-2017-CALUSA-COAST_6306542.pdf&isAutoFitRows=true

Here is the url to the resulting pdf in your system, which shows the VALUE! problem:
http://api.aspose.com/v1.1/storage/file/Vessel_Position_Report-AM-Report-02-17-2017-CALUSA-COAST_6306542.pdf

Hi,

Well, that is really strange as I could not reproduce the issue on our end, you may check my attached PDF file(s) for your reference. I guess either you are not specifying CalculateFormula attribute to “true” in your PdfSaveOptions, i.e., (It should be true):


string xml = @"

**true**

true

false

None

400

95

false

Pdf

";

Or you are not signing URI with respect to PdfSaveOptions (xml) while posting, you should sign the URI with respect to PdfSaveOptions, e.g

//sign URI

string signedURI = Sign(strURI);

**POST(signedURI, xml);**

//build URI

strURI = “https://api.aspose.com/v1.1/storage/file/out1pdf.pdf”;

So, could you double check this and let us know your code segment is ok.

Thank you.

Amjad,

It looks like the issue has been resolved on your end. We are no longer getting the incorrect PDF.

Thanks for your help.
Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved now. Let us know if you encounter any other issue, we will be glad to look into it and help you further.