Import file into Excel Sheet

Jayendra

New Member
Joined
Jul 25, 2002
Messages
8
Help!

I have a csv file (500,000) lines - I need to import this file into excel sheet 60,000lines per sheet meaning automatically import data from a file into multiple sheets.

Please help me with some good macro to do this job - this is ongoing bcos I get this file every week. HELP HELP HELP!

Thanks in advance
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Jayendra

New Member
Joined
Jul 25, 2002
Messages
8
Works like a charm - but the data in the csv is semicolon delimited (;) so I changed "Extended Properties=""text;HDR=Yes;FMT=Delimited"";" - but does not delimit.

anyway to get ; to work.

thanks a bunch
 

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
I couldn't find anything about how to specify the delimiter. It should work without modifying the code. If it doesn't you could use TextToColumns after the import.
 

Jayendra

New Member
Joined
Jul 25, 2002
Messages
8
I created system dsn called "importcsv" and changed the code to

oConn.Open "importcsv"

in the importcsv dsn - I choose Custom delimited and used semicolon ; and enable the header row

works like charm - thanks for all the help - this is a great user forum
 

Forum statistics

Threads
1,144,148
Messages
5,722,784
Members
422,457
Latest member
Mrmuskins

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top