We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Empty rows/columns are getting added to the excel file after using the Aspose utility on the file for processing

Hi,

We have been using Aspose Cells for Java to remove the duplicate rows in the excel file. Before running the aspose based utility the excel 2007 file has correct print preview. After running the utility few extra empty columns and rows are getting added. We did not face this problem while working with Excel 2003 file.

Attachments (Data file and Aspose utility) have been provided for your reference

Please suggest.

Thanks in Advance,

Regards,

krishna

Hi Krishna,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

Well, we tested your sample code with the latest version of Aspose.Cells and the output file has same print preview as per your input file. Please try the attached latest version of Aspose.Cells and see if it works fine for you. You may need to update afew APIs in your code as well. Please refer the following changes as per your shared code:

Change worksheet.getLastRowIndex() With worksheet.getCells().getMaxRow()

Change worksheet.getCell with worksheet.getCells().getCell

If you still face any problem, please feel free to contact us. We will be happy to help you out.

Thank You & Best Regards,

Hi,

I have used the new libraries that you attached and followed your suggestions regarding the deprecated API, but could not see the issue fixed.

Regards,

Krishna

Hi Krishna,

Could you post your generated excel 2007 Xlsx file here, we will check your issue soon.

Moreover, please make sure that you are using the latest fix provided in the previous post in this thread.

Thank you.

Hi Amjad,

Attached is the generated excel for your reference.

I several times built and ran the utility with the new Aspose provided zip file (as well as removed the deprecated API calls) and could not fix the issue.

Regards,

krishna

Hi Krishna,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We cannot find the difference between the preview of the generated file and your input file. We think it is the different behavior between Excel2003 and 2007. There are some empty columns being shown in the preview of your input file too. And when re-save your input file as xls by MS Excel, the re-saved xls shows no extra columns. If you want to get the same preview for xlsx file, I think you can change the PageSetup options a bit. Please see the following sample code:

Worksheet worksheet = workbook.getWorksheets().getSheet(nWorksheet);

com.aspose.cells.PageSetup ps = worksheet.getPageSetup();

//change the PageSetup, both of ways can work fine: setZoom() or setPrintArea

//ps.setZoom(55);

ps.setPrintArea("A:O");

Thank You & Best Regards,

Hi Nausherwan, Aslam

I tried your option and it did not allow me to run and facing the error as unable to open the zip file. I tried with the latest Aspose.Cells download.

Basically I am facing problem with margins in the Excel 2007 file. Before running the utility the margins were good. After running the utility they are getting changed.

Attached a word file for explaining the problem once again.

Please suggest.

Thanks in Advance,

Regards,

krishna

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

krishna_korrapati:
I tried your option and it did not allow me to run and facing the error as unable to open the zip file. I tried with the latest Aspose.Cells download.
.

Well, we checked your sample application with the latest version attached in my previous post (Aspose.Cells V2.1.1.14) and it works fine without any error. Please make sure you are using the latest version I attached in my previous post (Aspose.Cells V2.1.1.14) and not the official release which you may have downloaded from our download section (Aspose.Cells V2.1.1.0)

krishna_korrapati:
Basically I am facing problem with margins in the Excel 2007 file. Before running the utility the margins were good. After running the utility they are getting changed. Attached a word file for explaining the problem once again.

Well, the template file you shared with us does contain the empty columns you are mentioning. Please see the attached screen shot of the print preview of your template file using MS Excel 2007. Please make sure that you sent us the same file which you are using for your testing as you can see that the three empty columns are appearing in your template file’s Excel Print Preview.

Thank You & Best Regards,

Hi,

The base excel file has been attached for your reference.

Regards,

Krishna

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the template file.

We will further look into your issue and get back to you soon.

Thank You & Best Regards,

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for considering Aspose.

We have found your mentioned issue after an initial test. We will look into it and get back to you soon. Your issue has been registered in our internal issue tracking system with issue id CELLSJAVA-13101.

Thank You & Best Regards,

Hi,

Could you please let me know the tentative date when this fix will be available?

Thanks in Advance,

Regards,

Krishna

Hi,

Your issue is still under process. We will see if we can provide you an eta for the issue.

Thank you.

Hi,

Since your issue is related to the Style object model (internal) of the component, so, we need more time to
fix it. We will fix the issue in our next version which is released in
about two weeks.


Thank you for being patient.<o:p></o:p>


The issues you have found earlier (filed as 13101) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

<!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

<![endif]–>

We have fixed the issue of extra empty rows/columns in the new version v2.1.2.


Thank you.