Free Support Forum - aspose.com

Row grouping creates empty columns

Hi,

I'm using Aspose Cells for .NET 4.4.0.0.

When I apply grouping on some rows, all empty columns (from maxdatacolumn until column 256) are included in an export of this workbook. If I temporarily disable the row grouping in my code, no empty columns are exported.

I looked for this issue on the forum/internet but could not find any match.

In my application I start from an existing Excel file, but this problem also occurs when I start from an empty workbook.

Any solution to this ?

Thanks in advance,

Bart

Hi Bart,

Thanks for considering Aspose.

Could you elaborate your problem in detail and in which file format / object you are exporting your workbook data. Are you opening a template file and saving to .xls file? You may also send you sample test code with template file here.

Thank you.

The following code reproduces it: Excel shows all columns up to column IV, even though they are empty.

WorkbookDesigner designer = new WorkbookDesigner();

Worksheet worksheet = designer.Workbook.Worksheets[0];

//Add some text

for (int i = 0; i < 3; i++)

{

for (int j = 0; j < 3; j++)

{

worksheet.Cells[i, j].PutValue("Dummy content");

}

}

//Group 2 rows

worksheet.Cells.GroupRows(2, 3);

//Export

string exportedFileName = @"C:\Grouping.xls";

designer.Workbook.Save(exportedFileName);

//Open the Excel file

Process.Start(exportedFileName);

Hi,

Have these empty columns (maxdatacolumn - IV column) in grouped range create any problem for you? Any how we will check if we could enhance grouping feature (i.e., those extra empty columns do not scroll down to IV column ) and get back to you soon.

Thanks for being patient!

Ok thank you.

PS: It is not directly a problem because it only involves reporting exports, but still it is opened by end users. They will see a save dialog because Excel detects the empty rows after +- 5 minutes and removes them, so the workbook is automatically changed.

Regards,

Bart