Hello,
I noticed that when my code inserts columns into the grid, then saves as SpreadsheetML format, the results are missing the last column. It doesn't seem to matter how many columns I insert, only one column is missing from the end. I'm not sure if it's related, but I also noticed that MaxColumn seems to be off by 1 as well.
This code will demonstrate the problem:
public void InsertColumns()
{
var workbook = new Workbook();
var grid = workbook.Worksheets[0];
grid.Cells[0,12].PutValue("this is m");
grid.Cells[0, 13].PutValue("this is n");
grid.Cells[0, 14].PutValue("this is o");
grid.Cells[0, 15].PutValue("this is p");
grid.Cells[0, 16].PutValue("this is q");
Assert.AreEqual(16, grid.Cells.MaxColumn);
Assert.AreEqual(16, grid.Cells.MaxDataColumn);
const int insert = 2;
grid.Cells.InsertColumns(14, insert);
workbook.Save("InsertColumnsResult.xml", FileFormatType.SpreadsheetML);
workbook.Save("InsertColumnsResult.xls", FileFormatType.Default);
Assert.AreEqual(16 + insert, grid.Cells.MaxDataColumn, "MaxDataColumn is wrong");
Assert.AreEqual(16 + insert, grid.Cells.MaxColumn, "MaxColumn is wrong");
}