[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

excel open and parse info into sql

Asked by hesaigo999ca in Miscellaneous Web Development

Tags: createexcelrecordset, excel, temporary

I hope someone may be knowledged enough to help me???
I would be willing to pay if we were to get this working properly.
Email me if you are interested...and as this is part of a project/contract...you would also get credited for your help inside the code (hesaigo999@hotmail.com)
I am trying to open an excel file on the webserver to parse the info into sql server db.
Using asp i have the following code below...but i keep getting the errors
 Error Type:
 Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
 [Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xd54 Thread 0xf10 DBC 0x13661c4   Excel'.

I checked the fields inaide to make sure that they were all text or numerics and no mixed...
I also checked the file permissions and they are all set to full control r/w/e
I also included the adovbs.inc and have already inserted data previously to this into the db so I know its not the db conn string.

My viewexcelsheet.asp ( remember it has all its includes from other files linked by piggy back )
<%
Call header() ' this is the html header part with no important stuff
Call GetKarPowerInfoIntoDB
Call footer() ' this is the html footer with no important stuff
%>

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
function CreateExcelRecordset(xlsfile,sheet)
   Set objConn = Server.CreateObject("ADODB.Connection")
   objConn.Open "Driver={Microsoft Excel Driver (*.xls)};" & "DBQ=" & Server.MapPath( xlsfile )
   set CreateExcelRecordset = Server.CreateObject("ADODB.Recordset")    ' open excel Sheet
   CreateExcelRecordset.Open "Select * From [" & sheet & "$]",objConn, adOpenStatic , adLockPessimistic
end function
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
sub GetKarPowerInfoIntoDB()
   Set m_recordSet = CreateExcelRecordset( "/companyname/uploads/excelfile.XLS" , "excelfile" )
   
   if Not m_recordSet.EOF then   %>
  <TABLE Border=1 CellPadding=3>
   <TR>
<%    for f = 0 To m_recordSet.Fields.Count-1 %>
    <TH><% = m_recordSet.Fields(f).name %></TH>
<%    next %>
   </TR>
<%    do while Not m_recordSet.eof %>
   <TR>
<%       for f = 0 To m_recordSet.Fields.Count-1 %>
    <TD><% = m_recordSet.Fields(f).value %></TD>
<%       next %>
   </TR>
<%       m_recordSet.MoveNext
      loop %>
  </TABLE>
<% end if
end sub
 
Related Solutions
Keywords: excel open and parse info into sql
Title
1 Recordset
 
Loading Advertisement...
 
[+][-]02/09/03 07:05 PM, ID: 7915169Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Miscellaneous Web Development
Tags: createexcelrecordset, excel, temporary
Sign Up Now!
Solution Provided By: cdillon
Participating Experts: 2
Solution Grade: B
 
[+][-]02/08/03 09:17 PM, ID: 7911425Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/09/03 07:16 AM, ID: 7912597Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/12/03 05:45 PM, ID: 7938547Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/06/03 02:19 PM, ID: 9302707Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/06/03 06:55 PM, ID: 9303524Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/20/03 10:45 AM, ID: 9399392Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93