Hi Aspose’s Support,
I have converted Excel to Pdf as following sample :
http://www.aspose.com/docs/display/cellscloud/Convert+Excel+Workbook+with+Additional+Settings
In my sample excel tests, the result of cell G1 is not the same between Excel and PDF
(formula : =A3+8-WEEKDAY(A3,2) )
Can you show me the root of this issue and how to fix it ?
Thanks,
Chien
Convert Microsoft Excel Spreadsheet to PDF in Java using Aspose.Cells REST API has date format issue
Hi Chien,
Hi again,
<CalculateFormula>False</CalculateFormula>
<CheckFontCompatibility>False</CheckFontCompatibility>
<Compliance>None</Compliance>
<OnePagePerSheet>True</OnePagePerSheet>
<desiredPPI>90</desiredPPI>
<jpegQuality>70</jpegQuality>
<SaveFormat>Pdf</SaveFormat>
</PdfSaveOptions>
Hi Babar,
Thank you for your detail response. I have checked it again with your suggestion XML and I have another error. I’m using Java codes.
In my excel, I have two cells G1 (as previous examples), and G3 is another cell with having same formula as G3. Please see the attachment excel file and the result PDF with different options :
False
False
None
90
70
true
Pdf
and
True
False
None
90
70
true
Pdf
I’d prefer the option True but it doesn’t work perfect in this case.
Thanks,
Chien
Hi Chien,
Hi again,
This is to inform you that we have further investigated the presented scenario and we are able to figure out the problem cause. Please note, the problem is caused due to the casing of the parameter true, where the string ‘true’ needs to be in lowercase when Boolean values serialize. Please check the following piece of code that produces the correct output as attached.
Java
String infilename = “ExcelTemplate.xlsx”;
String outfilename = “ExcelTemplate(JavaSDK).pdf”;
String xml = “” +
“true” +
“300” +
“70” +
“true” +
“Pdf” +
“”;
//Convert the spreadsheet on storage
String strURI = “http:[//api.aspose.com/v1.1/cells/"+infilename+"/saveAs?newfilename=](https://api.aspose.com/v1.1/cells/%22+infilename+%22/saveAs?newfilename=)” + outfilename;
String signedURI = Utils.sign(strURI);
Utils.processCommand(signedURI, “POST”, xml, “xml”);
//Download the converted file
strURI = “http:[//api.aspose.com/v1.1/storage/file/](https://api.aspose.com/v1.1/storage/file/)” + outfilename;
signedURI = Utils.sign(strURI);
InputStream responseStream = Utils.processCommand(signedURI, “GET”);
Folder.saveStreamToFile(“D:/” + outfilename, responseStream);
responseStream.close();
System.out.println(“Done”);
Hi Babar,
I have checked with your suggestion XML again and I can see the better results. But the issue about different data between Excel and PDF still remains (in G1, G3) .
In excel : 10-08-15
In PDF : 7/9/2015
The XML for this test case as following :
true
false
None
90
70
true
Pdf
Thanks,
Chien
Hi Chien,
Hi Babar,
Thank you for your response. Please see the attachment image for my system’s locale and format cell in Excel. Should I change the locale in my Excel SpreadSheet ?
Thanks,
Chien
Hi Chien,
Hi Babar,
Thank you for your helpful response.
I have changed my system’s locale and I can see the data in Excel GUI is correct (show result date same as yours). But when I tested it again, I still see the issues in cell G1, G3 :
In excel file : 7/13/2015
In pdf file :
+ With calculation parameter = true
=> different result : 7/9/2015
true
true
false
None
400
95
true
Pdf
+ With calculation parameter = false
=> different result : #VALUE!
false
true
false
None
400
95
true
Pdf
Thanks,
Chien
Hi Chien,
Hi again,
Hi Chien,
Hi again,
Hi Chien,
The issues you have found earlier (filed as SAASCELLS-116;SAASCELLS-112) have been fixed in this update and deployed to live service.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.