Free Support Forum - aspose.com

Groupcolumn not working as expected

Hi,

1) Im trying to do group columns into 3 different groups. But it groups all columns as single rather then 3 group. (We are using java cells)

Cells cells = getSheet(sheetName).getCells();

cells.groupColumns(3, 7); // group one

cells.groupColumns(8, 12); // group two

cells.groupColumns(13, 17); // group three

2) How to set Zoom to 75%. The below code not working.

PageSetup pagesetup = getSheet(sheetName).getPageSetup();

pagesetup.setZoom(75);

Regards

Raj

Hi Raj,

Thanks for pointing it out,

We found both the issues and will figure it out soon.

Thank you.

Hi,

Please update after issue resolved. We need this fix soon.

We have Aspose Cells licence. If u need any thing we provide.

Regards

Raj

Hi Raj,

For the group function, Aspose does just same with MS Excel, when you group columns, if they are adjacent, MS Excel will union them as one single group too. If you can achieve 3 groups in MS Excel, please show us your Excel file and we will check it soon, thank you.

For the pagesetup, which version of Aspose.Cells for Java are you using? Would you please try our latest version 1.9.5 at download page? I have test it with following code and the generated worksheet does show its pagesetup as being zoomed 75%:

Workbook wb = new Workbook();
wb.getWorksheets().getSheet(0).getPageSetup().setZoom(75);
wb.save("ttt.xls");

Hi Raj,

For zooming a worksheet, kindly use Worksheet.setZoom() method. I think you and I wrongly thought about the API, PageSetup.setZoom() actually affects the scalling factor...In MS Excel Click File|PageSetup...in the PageSetup dialog click Page tab and check the scalling section.

So you may change the code as follows:

...............

Worksheets worksheets = workbook.getWorksheets();

Worksheet worksheet = worksheets.getSheet(0);

worksheet.setZoom(75);

And for Grouping Cols issue, Johnson is rightly saying, I never thought MS Excel also create a single group for adjacent columns. And we generally follow the MS Excel standards.

Have a good day!

Thank you.

Thanks! It works fine.

Regards

Raj