I had this snippet working, but then realized that I had Office installed on my test server, the prod server does not. Now I am getting errors that the files I am trying to parse are not vaild:
'C:\Users\Desktop\1.xls' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
Again, this was working:
// Get data from Excel
_filePath = Path.GetFullPath(_fileUpload.PostedFile.FileName);
_conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + _filePath + ";Extended Properties=Excel 8.0;HDR=Yes";
_conExcel = new OleDbConnection(_conString);
_conExcel.Open();
_dsExcel = new DataSet();
_daExcel = new OleDbDataAdapter(" ...
Go to the complete details ...