We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

InsertColumn(0) generates System.NullReferenceException in Aspose.Cells.GridDesktop.dll

Hi,


A simple example in C# using Aspose.Cells.GridDesktop.dll 8.6.2.0 generates an exception. I run under VS2008 net2.0 windows 7 pro 64bits. On a new doc or an imported one of any format.
The same occurs using the right click popup menu with “Insert Column”.
no problem with InsertRow()

namespace AsposeEvalNet
{

public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void openExcelFileButton_Click(object sender, EventArgs e)
{
String strImportFileName;

DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
strImportFileName = openFileDialog1.FileName;
String extn = Path.GetExtension(strImportFileName);
if (extn == “.xml” || extn == “.xls” || extn == “.xlsx”)
{
textBox1.Text = strImportFileName;
gridDesktop1.ImportExcelFile(strImportFileName);
}
else
textBox1.Text = “MS-Excel file extension not supported (use .xml(2003) .xls .xlsx)”;
}
}

private void toolStripInsertCol_Click(object sender, EventArgs e)
{
gridDesktop1.Worksheets[0].InsertColumn(0);
}
}
}


As a related addition, I just discovered that RemoveRow(index) seems to remove the last row, no matter the value of index
Thanks

Daniel

Hi,


Thanks for providing us details and sample code.

After an initial test, I observed the issue as you mentioned. I found “System.NullReferenceException” exception occurred on Inserting Column feature in GridDesktop control. The same issue occurs using the right-click popup context menu with “Insert Column” option, it works fine with Insert Row option though. I have logged a ticket with an id “CELLSNET-44107” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi Daniel,


This is to update you that we have fixed the problem logged earlier as CELLSNET-44107. We will shortly provide the fix here after ensuring the quality of the build.

Hi,

Please try our latest version/fix: Aspose.Cells.GridDesktop v8.6.2.6

We have fixed your issue "CELLSNET-44107" now.

Let us know your feedback.

Thank you.

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.