We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Excel Sheet has wrong number of columns

I'm trying to import the attached sheet but it doesn't get the last column. If i open the file in excel and resave it gets the column. Any ideas?

Code Snippet
/********************/
XLS.ExcelUtils.ThrowNotSavedOnDestroy = false;
XLS.IWorkbook excelBook = XLS.ExcelUtils.Open(inputStream);

IDataService dataService = ServiceManager.DataService;

IWorkbook workbook = null;

if (hasMultiplNonEmptyWorksheets(excelBook))
{
workbook = dataService.CreateWorkbook();
}

IWorksheet worksheet = null;

for (int index = 0; index < excelBook.Worksheets.Count; index++)
{
XLS.IWorksheet excelSheet = excelBook.Worksheets[index];

// excelSheet.UsedRange Cells and Column counts do not include the last column
}

BUG_754_columnError2.zip

3 Replies

MW Melba Winshia Syncfusion Team June 18, 2007 12:40 PM UTC

Hi Brian,

Thank you for your interest in Essential XlsIO.

I was able to reproduce the problem. Could you please provide some more information regarding the spreadsheet [BUG_754_columnError2.xls]?

1) Was this file [BUG_754_columnError2.xls] generated by using MS Excel or XlsIO?

a) Please mention the Office version, if MS Excel generated this [BUG_754_columnError2.xls] file?

b) Please mention the version of Essential XlsIO, if XlsIO generated this [BUG_754_columnError2.xls] file?

2) Was this file [BUG_754_columnError2.xls] generated by third party tool?

The above details would help us in investigating this issue further. And also, could you please open a new direct – trac incident with subject line as Forum 62507 - Excel Sheet has wrong number of columns ? So that it would be possible for us to provide more details regarding this issue.

Thanks,
Melba


BR Brian Richards June 19, 2007 12:08 PM UTC

I opened a Direct Trac incident.


MW Melba Winshia Syncfusion Team June 19, 2007 12:46 PM UTC

Hi Brian,

Your direct-trac incident has been updated.

Kindly let me know if you have any other questions.

Thanks,
Melba

Loader.
Live Chat Icon For mobile
Up arrow icon