Good to know that your issue is sorted out. We recommend you use our latest version of the product Aspose.Cells for Java v7.7.2 if possible where we made some further enhancements and included more fixes in it. Feel free to contact us any time if you need further help or have some other queries or issue, we will be happy to assist you soon.
Well, I am afraid, as you are calling the JAVA APIs within RPGLE (iSeries), we are not sure about it. We have also no such kind of environment to test your issue, also we have no knowledge about it. I think since you could not find setFormat for SaveOptions, so instead you may try to use the following if it sorts out your issue:
e.g
Sample code:
[JAVA]
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.XLSX);
you have to convert this code or call this API in your RPGLE (iseries) accordingly.
Well, it works fine in simple JAVA program here. You may try it in simple JAVA program and let us know the result here.
If you still find the issue, kindly provide us JAVA sample code (runnable) to reproduce the issue on our end, we will check it soon. For your information, we are using Aspose.Cells for Java v7.7.2 with JDK1.7 on Windows 7/8.
I am having some problems with some corrupted files when generating XLSX.
Here is the situation:
I have a program in an AS400 that can generate the XLS without any problems. I am trying to convert the programs so that it could also generate them in XLSX but everytime I generate one the file comes up with a corrupted message.
I am using aspose-cells-7.7.2.jar
I builted a simple java program just to see if the problem was with aspose and I tried to create a xlsx like this:
String stringFilePath = “C://Users//ulo012//Documents//Chart.xlsx”; workbook.save(stringFilePath, 6); I am unsing the 6 because I saw that FileFormatType.XLSX is an int with 6 as a value. And in this situation there is an XLSX created without any corruption.
The problem is, when I try to do exactly the same process in AS400 the generated file comes up as corrupted. I know that the version of aspose in the AS400 is the same that I have in my local machine and that I did the test in java.
However I am not sure if the java version itself that is installed in AS400 is compatible with aspose or with these types of functions.
I would like to know if you could help me with this because I have already tried all the other solutions that were posted online.
Well, Aspose.Cells for Java does support OpenJDK and Sun JDK. Please check JDK version(s) and make sure you have similar JDK version installed on your AS400 as per your working terminal (in a simple JAVA program).
Moreover, we recommend you to kindly try our latest version/fix: Aspose.Cells for Java v8.3.2.1 if it makes any difference.
(Note: you need to have JDK1.6 or above to work with this version/fix).
I am not sure if either I didn’t understand your response or if I wasn’t able to explain the problem correctly.
This is the problem, I am unable to create an XLSX file in an AS400 machine, everytime I try to do it the file comes up as corrupted.
In order to try and find the reason of this problem I created a Java program in my Windows machine using the same .jar that is on the AS400 machine. As I told you in my previous post, in the windows machine there wasn’t any problem.
The problem only occurs when we try to do it in the AS400 machine.
This being said, what is the JDK version needed to run aspose-cells-7.7.2.jar? Is it also JDK 1.6 or previous versions also work.
Please I only need help to understand and fix the problem in the AS400 machine.
We are not very sure what caused your issue on AS400. It might be due to the different zip implementation of the JDKs on different platforms or may be the streams did not be flushed or closed correctly. We recommend you to just give our latest version/fix v8.3.2.x a try to check whether you can get positive results or not. Moreover, could you give us the generated XLSX files produced on different platforms with the same application, data and version of Aspose.Cells, we will try to check the files and try to find some clue for the issue.