.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old June 23rd, 2003, 05:21 PM
Neider Neider is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 1 Neider User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Opening an excel file

New to asp.net and having problem with this. I receive reports via email of training classes attended from outside providers that are excel files. These files are used to update licensee iffo in our SQL 2000 database. Presently I am opening the file to assure its formatted correctly then using the import ability of SQL 2000 to transform the file then run a stored procedure to load the data to update the appropriate tables. Effective but time consuming. My idea is to develope a asp.net page so that our licensing department could do this themselves. My idea is to open the file on an asp.net page so it can be quickly reviewed for proper format then save to the sql database and run the stored procedure when the user clicks a button. My problem is I cannot get the excel file to open in asp.net. I used some code I found on this site but I get the following server error,<br><br>The Microsoft Jet database engine cannot open the file ". It is already opened exclusivly by another user, or you need permission to view its data.<br><br>here is the code I'm using on a test page to try and get it working<br><br> Dim myDataset As New DataSet()<br> Dim strConn As String<br> strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=testexcel.xls;Extended Properties=""Excel 8.0;"""<br> Dim myData As New OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn)<br> myData.TableMappings.Add("Table", "ExcelTest")<br> myData.Fill(myDataset)<br> DataGrid1.DataSource = myDataset.Tables(0).DefaultView<br> DataGrid1.DataBind()<br><br>presently the test file is located in the solution but my goal is to open it from the users desktop.<br><br>Any help is greatly appreciated, or any code to open from a tab deliminated file would also work as the providers could save the excel file that way easily. If I make it to hard for the small providers it will be dificult to collect the data.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgramming.NET Development > Opening an excel file


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT