I'm having a problem inserting a column into an XlsIo worksheet. The error detail is in the attached text file. When I have a value of nCol of 4 in the following code I get the error. The sheet is instantiated and has been written to in column 3. I want to capture the formatting in column 3 and put that into column 4 with an insert operation.
// insert a new column
if (nCol > 3)
{
sheet.InsertColumn( nCol, 1, ExcelInsertOptions.FormatAsBefore );
}
The error message is "Specified argument was out of the range of valid values.\rParameter name: FirstRow"
Any suggestions to get this to work?
error detail.zip