One of my customers ask me to Convert Excel to XML and save the data to database on website, but his website does not support Ms Excel. I have to look for another solution, on CodeProject, I got ExcelReader.
 |
Introduction
This library is built based on the following documents, thanks to their authors:
Record structures in BIFF8/BIFF8X format are considered.
What it can do?
- It can read read worksheets in a workbook and read cells in a worksheet.
- It can read cell content (text, number, datetime, or error) and cell format (font, alignment, linestyle, background, etc.).
- It can read pictures in the file, get information of image size, position, data, and format.
Using the code
- Open file:
Stream fileStream = File.OpenRead(file);
Workbook book = new Workbook();
book.Open(fileStream);
Worksheet sheet = book.Worksheets[0];
- Read cell:
int row = 1;
int col = 0;
string ID = sheet.Cells[row, col].StringValue;
Picture pic = sheet.ExtractPicture(row, col);
|
This entry was posted
on Thursday, August 2nd, 2007 at 8:07 am and is filed under .NET, Open Source.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.