Unfortunately, both OLEDB and FileUploadControl seem to want a path.
Right now, this works after a user has submitted an excel file but won’t work on my server due to 0 file system access:
FileUploadControl.SaveAs(filePath);
ConvertToCSV(filePath);
...
var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", filePath);
var adapter = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", connectionString);
I see FileUploadControl exposes a stream and a bytecode. Would it be possible to traverse the file with those properties?
Have a look at Excel Data Reader
I was able to read values from the stream no problem using the following code:
Obviously my example is really simple but having the data as a DataSet should give you a lot of flexibility in how you read it.