Converting some xls/xlsx getting blank page in Aspose cell android via java

When ever i tried to convert xls/xlsx file type .Getting blank page. please find the attachment.

The code used below,

Workbook workbook = new Workbook(srcFile);
com.aspose.cells.PdfSaveOptions cellsOptions = new com.aspose.cells.PdfSaveOptions();
workbook.save(destFile
, cellsOptions);

sampleXLSX.zip (15.9 KB)

@brightraj,

I have opened the template file sample_XLSx.xlsx in Excel 365 page break preview and observed that there are many blank pages as shown in the attached image. Please test it at your end and if PDF generated by Aspose.Cells is different than the Excel output, then share the details along with the output PDF file and images showing the error. We will analyze the information and provide assistance at the earliest.
Capture.JPG (110.3 KB)

@brightraj,

Aspose.Cells renders MS Excel file to PDF file format as it is shown print previews for different sheets in MS Excel manually (you may confirm it). If you want blank pages should not be rendered, I think you may try to add the two lines to your code segment and see it it works for your needs:
e.g
Sample code:

.........
 Worksheet worksheet = workbook.getWorksheets().get(0);
            worksheet.getCells().deleteBlankColumns();
            worksheet.getCells().deleteBlankRows();
...........

Hope, this helps a bit.

Hi, Tried with the above code is not working .

Excel file text missing after converted to pdf.why? Even simple excel files.

@brightraj,

Please share a runnable project and the generated PDF file on your side. We will reproduce the problem and provide our feedback after analysis.

Hi ,

Attached the excel files which is not able to convert .

Please try to convert from your side and share the feedback.
sample_excel.zip (2.1 MB)

@brightraj,

Thanks for the files. Please also share runnable project for our analysis.

@brightraj,

We have investigated the files a bit and used the code as under then noticed following:

Workbook wb = new Workbook(sourceFile);
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
wb.save(outFile.pdf, pdfSaveOptions); 
  1. for the file “Budget.xls”, the generated PDF is OK.
  2. for the file “Salary-14.xls”, the output PDF is generated, but the first image is lost.
  3. for the file “Rainfall.xls”, the exception is thrown, because there is “word art” which is not supported in Android.

For the issue in point number 2, we have logged the issue “CELLSANDROID-88” in our database for investigation and for a fix.

For third point, we have logged the issue “CELLSANDROID-89” which can take some time for resolution because wordart is not supported currently.

Also, please share your code, the output PDF files generated on your side, and some screenshots that highlight the issues.

@brightraj,

This is to inform you that we have fixed your issue (logged earlier as “CELLSANDROID-88”) now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@brightraj,

Please try our latest version/fix: Aspose.Cells for Android via Java v19.4:

Your issue (logged earlier as “CELLSANDROID-88”) should be fixed in it.

Let us know your feedback.