Excel spreadsheet to SQL Server 2000?

R

Robert Davis

Anyone have some VBA script for creating and populating an SQL Server 2000
table in a database with the data in the Excel spreadsheet?

TIA!

Robert
 
M

Magnus Salgo

Also interested

I have looked at the links below but are not 100% sure
this is the right way forward

How to import data from Excel to SQL Server
http://support.microsoft.com/default.aspx?scid=kb;en-us;321686

Loading and reading the Microsoft Excel file contents using C#
http://www.codeproject.com/useritems/Excel_Application_in_C_.asp

Convert Excel to XML file/XML Schema, and validate Excel against XML Schema
http://www.codeproject.com/csharp/excel2xml.asp

Using the Excel 2003 XML Tools Add-in Version 1.1
http://msdn.microsoft.com/office/de...dc_xl2003_ta/html/OfficeExcelXMLToolAddin.asp

Office 2003: XML Reference Schemas
http://www.microsoft.com/downloads/...52-3547-420A-A412-00A2662442D9&displaylang=en


Office 2003 XML Reference Schemas
http://www.microsoft.com/office/xml/default.mspx

Microsoft Office System and XML: XML in Action
http://msdn.microsoft.com/library/d.../dno2k3ta/html/odc_ofofficesysxmlinaction.asp

Case-Study: XML in the Microsoft Office System
http://msdn.microsoft.com/office/un...=/library/en-us/dno2k3ta/html/odc_contoso.asp


XML and Microsoft Office Excel 2003: Creating an Expense Report Template
http://msdn.microsoft.com/office/un...rary/en-us/odc_xl2003_ta/html/odc_xlexpen.asp
 
D

Dick Kusleika

Robert said:
Anyone have some VBA script for creating and populating an SQL Server
2000 table in a database with the data in the Excel spreadsheet?
Robert:

Here are a couple of links that might be useful

http://www.dailydoseofexcel.com/archives/2006/01/21/create-mdb-tables-in-vba/
http://www.dailydoseofexcel.com/archives/2005/12/02/create-insert-into-sql-statements/

The first one describes creating and populated Jet databases, but the
populating part should be the same for any database. I basically make an
INSERT INTO statement and Execute it. I don't show the connection string on
that post, but it wouldn't do you any good anyway because you'll have to
make a connection string for SQLServer.

The second link is a different version of the MakeInsertInto function. I
don't remember all the changes, but if you use the function, I thought it
would be best to show you both versions.

Sorry that's not a very good answer to your question, but hopefully it gets
you started.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top