Migrating Excel Table to SQL Server 2005

O

OrlaL

Version: 2008
Processor: Intel

Hi,

I am having a lot difficulty trying to get an Excel 2007 table import into a SQL Server 2005 table. I have looked through the internet and cannot find any help other than download software. The main problem I have come across is that I want the user to be in the Excel and click a macro button to import the data.

The code I have been trying is:

Dim con As Object

Set con = CreateObject("ADODB.Connection")
con.Open _
"Provider=SQLOLEDB.1;Data Source=ORLA-PC\SQLEXPRESS;" & _
"Initial Catalog=Edpac;Trusted_Connection=Yes"
con.Execute _
"SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0'," & _
"'Text;Database=C:\Users\Orla\AppData\Local\Temp\;','SELECT * FROM [Book1.xls]')"

I did find a web page that told me about permissions so I did everything they told me so every group and user name was allowed full control in the Temp folders.

Any help would be greatly appreciated!
Thanks,
Orla
 
J

JE McGimpsey

Version: 2008
Processor: Intel

Hi,

I am having a lot difficulty trying to get an Excel 2007 table import into a
SQL Server 2005 table. I have looked through the internet and cannot find any
help other than download software. The main problem I have come across is
that I want the user to be in the Excel and click a macro button to import
the data.

The code I have been trying is:

Dim con As Object

Set con = CreateObject("ADODB.Connection")
con.Open _
"Provider=SQLOLEDB.1;Data Source=ORLA-PC\SQLEXPRESS;" & _
"Initial Catalog=Edpac;Trusted_Connection=Yes"
con.Execute _
"SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0'," & _
"'Text;Database=C:\Users\Orla\AppData\Local\Temp\;','SELECT * FROM
[Book1.xls]')"

I did find a web page that told me about permissions so I did everything they
told me so every group and user name was allowed full control in the Temp
folders.

Hmm... you've wandered into a newsgroup about XL for Macintosh (hence
the ".mac." in the newsgroup name). I suspect you'd have more success in
one of the Windows-centric newsgroups, e.g.,

microsoft.public.excel.programming
 
C

CyberTaz

Version: 2008
Processor: Intel

Hi,

I am having a lot difficulty trying to get an Excel 2007 table import into a
SQL Server 2005 table. I have looked through the internet and cannot find any
help other than download software. The main problem I have come across is
that I want the user to be in the Excel and click a macro button to import
the data.

The code I have been trying is:

Dim con As Object

Set con = CreateObject("ADODB.Connection")
con.Open _
"Provider=SQLOLEDB.1;Data Source=ORLA-PC\SQLEXPRESS;" & _
"Initial Catalog=Edpac;Trusted_Connection=Yes"
con.Execute _
"SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0'," & _
"'Text;Database=C:\Users\Orla\AppData\Local\Temp\;','SELECT * FROM
[Book1.xls]')"

I did find a web page that told me about permissions so I did everything they
told me so every group and user name was allowed full control in the Temp
folders.

Hmm... you've wandered into a newsgroup about XL for Macintosh (hence
the ".mac." in the newsgroup name). I suspect you'd have more success in
one of the Windows-centric newsgroups, e.g.,

microsoft.public.excel.programming

Huh!

I thought the same thing except that the OP *specifically* entered 2008 as
the version & Intel as the processor. I've spent a fair amount of time
trying to figure out how that could possibly fit with the context of the
message. Now I don't feel so bad :)

Regards |:>)
Bob Jones
[MVP] Office:Mac
 
J

JE McGimpsey

CyberTaz said:
I thought the same thing except that the OP *specifically* entered 2008 as
the version & Intel as the processor. I've spent a fair amount of time
trying to figure out how that could possibly fit with the context of the
message. Now I don't feel so bad :)

I just assumed that the OP was on a wIntel box and put 2008 as the
closer to 2007 than 2004...
 

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