xls file to datatable errors

Technical support for Spire.XLS

Moderators: iceblue support, Flash, Manager

xls file to datatable errors

Postby fugees » Wed Nov 24, 2010 4:17 am

use this code read xls file to datatable has errors

Code: Select all
Spire.Xls.Workbook workbook = new Spire.Xls.Workbook();
            string ext = Path.GetExtension(FileName);
            if (ext == ".xls")
            {
                workbook.LoadFromFile(FileName, ExcelVersion.Version97to2003);
            }
            else if (ext == ".xlsx")
            {
                workbook.LoadFromFile(FileName, ExcelVersion.Version2007);

            }

            Spire.Xls.Worksheet sheet = workbook.Worksheets[0];
            DataTable excelData = sheet.ExportDataTable();
Attachments
xlsfile.rar
(971 Bytes) Downloaded 256 times
fugees
 
Posts: 5
Joined: Fri Oct 29, 2010 8:46 am

Re: xls file to datatable errors

Postby harry.support » Wed Nov 24, 2010 11:14 am

fugees wrote:use this code read xls file to datatable has errors

Code: Select all
Spire.Xls.Workbook workbook = new Spire.Xls.Workbook();
            string ext = Path.GetExtension(FileName);
            if (ext == ".xls")
            {
                workbook.LoadFromFile(FileName, ExcelVersion.Version97to2003);
            }
            else if (ext == ".xlsx")
            {
                workbook.LoadFromFile(FileName, ExcelVersion.Version2007);

            }

            Spire.Xls.Worksheet sheet = workbook.Worksheets[0];
            DataTable excelData = sheet.ExportDataTable();


Sorry for that, it is a bug and we have fixed it.
We need more time to test it and will release it before the next Monday.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar
harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Re: xls file to datatable errors

Postby harry.support » Thu Dec 02, 2010 3:05 am

the new version of spire.xls had been released this Monday.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar
harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm


Return to Spire.XLS

Who is online

Users browsing this forum: No registered users and 0 guests

cron