This project has moved and is read-only. For the latest updates, please go here.

just open an excel and read some cells

Mar 17, 2015 at 8:02 PM

I just want to open an Excel that already exists and read some fixed cells of the third worksheet.
for example: A5 and A6.

Sorry for the stupid question. I have been searching how to do it and I have not found it. With your libraries you can really do many things.

Kind regards,
Mar 18, 2015 at 12:50 PM
Edited Mar 18, 2015 at 3:35 PM
Try one of the examples in release folder.

Just like:

Excel.Application app = new Excel.Application();
var book = app.Workbooks.Add();
var sheet = book.Workseets[1] as Excel.WorkSheet;
var value = sheet.Cells["A5"].Value; // get value from A5

Mar 18, 2015 at 3:26 PM
Thanks for the fast answer.

Yes, I have seen it in many examples. I thought it was creating an Excel from scratch. I mean to open an Excel, something like:"c:\ExcelFile.xsl");

Mar 18, 2015 at 3:34 PM
nearly correct. its:

Excel.Application app = new Excel.Application();

Marked as answer by joanferrer on 3/18/2015 at 10:29 AM