Free Support Forum - aspose.com

After inserting columns- xml output seems to drop last column

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");
}

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. The issue has been registered in our issue tracking system with issue id CELLSNET-12679.

Thank You & Best Regards,

Hi,

Please try the attached version, we have fixed the issue.

Thank you.

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


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

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan