Import data from excel to dataset

  • Thread starter Thread starter Schultz
  • Start date Start date
S

Schultz

I would like to know if it is possible to import data from MS Excel
2000 to a dataset using asp.net. The excel file would need to be
uploaded to the server from a web page first, before the loaded into a
dataset. After the data is stored in the dataset, i would need to write
the information to an access db. If it is possible to do this, where
can I find help on how to import excel data to a dataset?

Thanks!
 
¤ I would like to know if it is possible to import data from MS Excel
¤ 2000 to a dataset using asp.net. The excel file would need to be
¤ uploaded to the server from a web page first, before the loaded into a
¤ dataset. After the data is stored in the dataset, i would need to write
¤ the information to an access db. If it is possible to do this, where
¤ can I find help on how to import excel data to a dataset?

Assuming you're uploading the Excel Workbook to the file system you can actually import directly
into an Access database, w/o having to use a DataSet.

You may want to follow-up with some more details if you need additional help.


Paul
~~~~
Microsoft MVP (Visual Basic)
 
Reading an Excel file into a DataSet is definitely possible as I have done
this in the past. The articles mentioned by other responders will help you
out. One thing that drove me crazy when I was developing similar
functionality was an OleDBException error I got when trying to read the file
that was uploaded. I'd link you to the page that fixed it for me, but it is
no longer available. However, it was permissions problem. When the ASP.NET
account was reading the Excel file, it was attempting to create a temp file
at C:\Documents and Settings\<machine_name>\ASPNET\Local Settings\Temp. For
some reason the ASP.NET account did not have write access to this directory.
Once I gave it the permissions it needed, no more error. Hope this helps.
 
Back
Top