Our client gets Excel files in Excel's HTML format.(That's the way it arrives; nobody has any control over that.) We then need to run a report based on the data in the file. Using ADO.NET (OleDbReader) results in a "External file not in expected format" exception.
If the data is converted to regular Excel format it gets read in OK. However this is not really a solution as it imposes an extra step they must take and they are not too computer-literate at the best of times.
The only solution I could come up with was to use Excel Automation to create a new spreadsheet, fill it with the same data, and read that one instead. But ADO.NET seem to only be able read from a file on disk. I could of course save the file and delete it when I'm done with it (which I've verified will work). But I'm uncomfortable with the idea of messing around with their filesystem. So my first question is - is there a way to fill a DataTable from an in-memory Excel Worksheet?
Additionally, I don't like the whole business with using Automation; it's incredibly slow. The operation takes over 30 seconds even without filling the DataTable. So a solution that makes it any slower is not going to be any good. That brings me to my second question - Is there a better way to accomplish what I'm trying here?