How to read the contents of an xlsx file?

Mar 3, 2010 at 11:48 AM

It seems like the API is designed to write xlsx files, but can it also be used to read the contents of a xlsx file?

WorksheetWriter.PastText makes it easy to write to a file, but a corresponding WorksheetReader.ReadText does not exists.

I can browse the OOXML DOM using WorksheetReader.GetCell(..) but then I have to do all the hard work by myself :-(

...or am I missing something here?



Jan 24, 2012 at 11:52 AM

almost 2 years later but I was wondering about the same and found the answer, I think.

var cell = writer.FindCell("A1");             
var val = cell.CellValue;

Using WorksheetReaded instead of the writer would be a more logical way, but retrieving text worked for me.