0

I currently have a worksheet with many existing column groupings. I want to remove ALL those groups. The following code does not work:

cells.UngroupColumns(cells.MinColumn, cells.MaxDataColumn + 1);

Any suggestions?

Pouya Barrach-Yousefi
  • 1,207
  • 1
  • 13
  • 27

1 Answers1

0

This works:

cells.UngroupColumns(cells.MinColumn, cells.MaxColumn + 1);
Pouya Barrach-Yousefi
  • 1,207
  • 1
  • 13
  • 27
  • "Moreover, for your information, MaxColumn would give the farthest column index which contains data or formattings where as MaxDataColumn would give your the farthest column index which contain data. In short, if you got some grouped cells with only formattings applied and without any data/values, you should use MaxColumn attribute instead." - Aspose – Pouya Barrach-Yousefi Sep 05 '14 at 15:10