Aspsoe Excel Output Issue for Libra/Open Office

Hi Team ,


We are using Libra Office /Open Office to view the Excel Output , but facing data issues .

We are facing issue for Oracle EBS r12 . We are currently using Aspose version v7.1.0.3.

Please address this issue on priority .

Please see the attached document which shows the difference in the outputs when viewed from Open Office and MS Excel.

Thanks !

Hi Karan,

Thanks for your posting and using Aspose.Cells for Java.

Please download and use the latest version: Aspose.Cells for Java 7.7.2 and see if it makes any difference.

Some xls/xlsx files do not open well in Open Office Calc because these application are not meant to work with these files primarily. In such cases, it is not the bug of Aspose.Cells but limitation of these applications.

If your problem persists, then please provide us your source xls/xlsx files and sample code replicating this issue with the latest version.

We will look into your issue and help you asap.

Hi Team ,


We tried with the latest jar files but we are getting some license issue . It appears to not work with current license we have and is giving error as per the attached screen shot .

We would like to have a solution which works with the current license and is compatible to the version of jar files we use ( Current Version : Aspose-Cells for Java 7.1.0.3).


Thanks !

Hi Karan,

Thanks for your posting and using Aspose.Cells for Java.

Could you comment your license related code and then check how the latest version works at your end? If it is not working fine, then please provide us your sample code replicating this issue for our investigation. Also provide us any source files which you are using in your code.

Please also provide us your output xls/xlsx file which is showing fine in MS-Excel but not showing up in Libra Office / Open Office.

Kindly send us your license using the steps mentioned in this article.


We will look into it why your license is not working and fix this issue in the latest version.


Hi Shakeel ,


I am getting some errors while sending you the lic file you have requested for . But I am including the sample code . In my previous comments , I have included the screen shots of the Excel an d Open Office Calc files . Please suggest an alternate way to send out the lic file .

Workbook writeWorkbook = new Workbook();
SaveOptions opt = new OoxmlSaveOptions();


if(format.indexOf(“2003”)!=-1)
{
isAsposeSupport=asposeUtil.isAsposeSuport(processID);
opt = new XlsSaveOptions();
}
if(“Y”.equalsIgnoreCase(showLog)){
out.println(“FORMAT “+format+”
”);
out.println(“FLAG “+flag+”
”);
out.println(“ASPOSE SUPPORT “+isAsposeSupport+”
”);
}
OutputStream outExcel = response.getOutputStream();
if((“1”.equals(flag)||“2”.equals(flag)) && isAsposeSupport)
{
try{
if(!isNull(processID) && !isNull(user_id) && !isNull(format))
{
String maxClobProfile = asposeUtil.getProfile(“XXEIS_RSC_GENERATE_EXCEL”,null);
fileName=reportName+""+user_id+""+processID+"_"+flag;
if(format.indexOf(“2003”)!=-1)
{
fileName+=".xls";
response.setContentType(“application/vnd.ms-excel; charset=UTF-8”);
opt.setSaveFormat(FileFormatType.EXCEL_97_TO_2003);
}
else
{
fileName+=".xlsx";
response.setContentType(“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8”);
opt.setSaveFormat(FileFormatType.XLSX);

}
EISRSCCommonUtil.writeLog(“OUTPUT_FILES”,“EISRSCGenerateJAVAExcel : Excel : Output File Name -> “+fileName,isLogEnabled,processID);
response.setHeader(“content-disposition”, “inline; filename=”” +fileName+ “””);
if(maxClobProfile==null || maxClobProfile.trim().length()==0 || “-999”.equalsIgnoreCase(maxClobProfile) || format.indexOf(“2003”)!=-1 || isReportSet)
{
// Modified by Sukesh for MLS, passing mlsLoginLangCode
gcsv.genearateClob(processID,writeWorkbook,user_id,format,flag,logPath,opt, mlsLoginLangCode);
writeWorkbook.save(outExcel,opt);
outExcel.close();
}


We are using the methods : setSaveFormat , FileFormatType to generate the Excel output formats .


Thanks !

Hi Karan,

Thanks for your posting and using Aspose.Cells.

Could you please try again? I have checked it by sending the file to myself and it works fine. Please see the screenshot how to send an email to me.

Please also provide us some more simplified and runnable sample code to investigate this issue.

Screenshot:

Hi Shakeel ,


I have emailed you the Lic file .

Below is the sample code , We are using as part of generating outputs :


Workbook writeWorkbook = new Workbook();
SaveOptions opt = new OoxmlSaveOptions(SaveFormat.XLSX);


if(format.indexOf(“2003”)!=-1)
{
isAsposeSupport=asposeUtil.isAsposeSuport(processID);
opt = new XlsSaveOptions(SaveFormat.EXCEL_97_TO_2003); }

OutputStream outExcel = response.getOutputStream();

fileName=reportName+""+user_id+""+processID+"_"+flag;
if(format.indexOf(“2003”)!=-1)
{
fileName+=".xls";
response.setContentType(“application/vnd.ms-excel; charset=UTF-8”);
}
else
{
fileName+=".xlsx";
response.setContentType(“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8”);
}


Thanks !


Hi Karan,

Thanks for using Aspose.Cells.

I could not test your license issue, because the string you provided is actually fragments of license and not a complete license file. You need to set the license as it is without any modification to make it work perfectly.

Also, I tested your code after doing some modifications and did not find any issue. The output xlsx file opens fine in OpenOffice without any issue. I have attached the output xlsx file for your reference.

The code you provided does not actually do anything other than creating the workbook and sending it to stream.

Java
Workbook writeWorkbook = new Workbook();
SaveOptions opt = new OoxmlSaveOptions(SaveFormat.XLSX);

OutputStream outExcel = response.getOutputStream();

Worksheet worksheet = writeWorkbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(“A1”);
cell.putValue(“Hello World!”);

response.setContentType(“application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=UTF-8”);
response.setHeader(“content-disposition”, “attachment;filename=output.xlsx”);

try
{
writeWorkbook.save(outExcel, opt);
}catch(Exception e)
{
//writeError(e, response);
return;
}

Screenshot:

Hi Team,


We also tried with same thing but issue is getting replicated with bulk amount of data as attached sample.
the same sample data when opened from Excel and Open Office has some issues . Please observe the difference of the lost data columns.


The outputs are generated using Aspose version v7.1.0.3. If we are using the latest jar files provided , we are facing the license issue as mentioned earlier.

Thanks !


Hi Karan,

Thanks for using Aspose.Cells.

We have converted your Sample_Output_XLSX.xlsx into ods using the older and newer version and data is not lost. I have attached the output ods file for your reference.

Kindly use the latest version: Aspose.Cells for Java 7.7.2 and comment your license related code. Because we do not fix bugs in older versions. You will have to use latest version first. If issue still occurs with the latest version, then please provide us your sample code replicating the issue. We will look into it and fix this issue