I'm trying to build an XML file from an Excel spreadsheet (no header row). This will be part of a service on a server, so I really don't want to use the MS Office PIO files. I found LinqToExcel on google and tried this code:
var clientExcel = new ExcelQueryFactory(excelFileName);
var sourceXml = new XElement("rows",
clientExcel.WorksheetNoHeader().Select(line => new XElement("row",
line.Select((column, index) => new XElement("Column_" + index, column)))));
The code compiles, but at runtime I get a TargetInvocationException. I've worried at this for the better part of a day, but can't figure out where I've gone wrong.
I'd appreciate it if someone would set me straight.