Board index » Visual Studio » Importing Excel into Access with VB

Importing Excel into Access with VB

Visual Studio273
I need some code ideas to import Excel into Access using

VB. I need to use VB because the Excel column formats are

not always consistent.



I'm importing a fairly simple spreadsheet.



Any assistance would be greatly appreciated.


-
 

Re:Importing Excel into Access with VB

* "T2" <no1packfan@worldnet.att.net>scripsit:

Quote
I need some code ideas to import Excel into Access using

VB. I need to use VB because the Excel column formats are

not always consistent.



Are you sure you are talking about VB.NET?



--

Herfried K. Wagner [MVP]

<www.mvps.org/dotnet>">www.mvps.org/dotnet>

-

Re:Importing Excel into Access with VB

Hi T2,



Maybe you can try it using OleDB here are Oledb connection strings including

Excel.



www.connectionstrings.com/">www.connectionstrings.com/



Watch special to that Imex I never used that, so I dont know if it will

works for you



And this is a sample SQL string, watch that $ sign.

OleDb.OleDbCommand("Select * from [sheet1$]"



I hope this helps,



Cor



Quote
I need some code ideas to import Excel into Access using

VB. I need to use VB because the Excel column formats are

not always consistent.



I'm importing a fairly simple spreadsheet.



Any assistance would be greatly appreciated.





-