This is a discussion on "Excel to SQL Server database" within the Classic ASP section. This forum, and the thread "Excel to SQL Server database are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Excel to SQL Server database
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Excel to SQL Server database
Hi,
I have to start working on a ASP which would actually automate the process of exporting the data from excel to SQL Sever database. Can you please tell me how to go about it. Madhuri |
|
|
|
||||
|
Re: Excel to SQL Server database
What experience have you got?
Have you worked with recordsets/connections before?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: Excel to SQL Server database
yes I have worked on recordsets and connections before.
|
|
||||
|
Re: Excel to SQL Server database
Here's a great website for Connection Strings:
http://www.connectionstrings.com/ This is the idea: 1. Connect to the spreadsheet using this string: "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDi r=c:\mypath;" 2. Loop through the recordset doing the following...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: Excel to SQL Server database
Hi,
I am looking for a code which would help me importing the data in excel sheet to SQL Server table. I am good at connecting strings and stuff. Please let me know how to go about the importing part. Regards, Madhuri |
|
||||
|
Re: Excel to SQL Server database
This is an ASP forum so I assumed you wanted to do it in ASP.
What do you not understand about my previous post?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Re: Excel to SQL Server database
I understand the first part where you are trying to make a connection to spreadsheet but sorry I fail to understand the second part.
Do While Not excelRS.EOF sqlRS.AddNew For Each fld In excelRS.Fields sqlRS(fld.Name) = fld.Value ' which is the same as: excelRS(fld.Name) Next sqlRS.Update excelRS.MoveNext Loop I would have thought that we would create a table first and export the data from excel to SQL database (using ASP code). Sorry if I have confused you earlier. |
|
||||
|
Re: Excel to SQL Server database
Well, have you used MS SQL before?
What software do you use to manage the database? My assumption was that: 1. You know how to retrieve information from the excel spreadsheet 2. You have created a table in the SQL database with the same fields and in the same format as the table in the spreadsheet The code I gave you is an algorithm to do the actual transfer of data from A to B. It would be easier to help if you gave me some indication of what you have so far, and if you actually had a go at implementing something. You can't expect me to give you the exact answer to your specific need...
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
![]() |
| Tags |
| excel, sql, server, database |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| URGENT!!!! Send HTTP request from one web server to another server | chandra.nowduri | ASP.NET Forum | 1 | Aug 7th, 2006 19:18 |
| XML Code for transfering data from one SQL Server Database to another database | plolla | Other Programming Languages | 1 | Aug 3rd, 2006 18:37 |
| excel -> mysql database | riotman | Databases | 3 | Jan 30th, 2006 22:59 |
| Need to process data on one server, utilize it on another server ... can it be done? | jaobrien | Classic ASP | 1 | Dec 6th, 2005 00:58 |
| Database connectivity from ASP.NET pages hosted on a free web server? | JKidd32 | ASP.NET Forum | 3 | Nov 30th, 2005 18:49 |