c# - Reading xlsx saved as xls with LinqToExcel -
look @ post: excel "external table not in expected format."
i have same problem depicted in post i'm using linqtoexcel read file instead of plain queries.
what linqtoexcel equivalent setting connection string answer post suggests?
here code i'm using:
var excelom = new excelqueryfactory(ppatharchivoom); var despachosclient = c in excelom.worksheet<registrodespachoom>("tabla_1") c.destinat.contains("sometext") select c; //identificar los despachos asociados números de documento sin datos aún. foreach (registrodespachoom despacho in despachosclient) { ... and problem is: "external table not in expected format" in foreach start.
edit (my problem solved question remains unanswered): i'm using epplus instead of linqtoexcel task , working ok now.
you need use ace database engine instead of jet database engine.
you can linqtoexcel setting databaseengine property. here's example
var excelom = new excelqueryfactory(ppatharchivoom); excelom.databaseengine = databaseengine.ace;
Comments
Post a Comment