Trying to read in a CSV file into an Excel one when you open it

  • Thread starter Thread starter Albretch
  • Start date Start date
A

Albretch

Hi

I have a nicely formatted csv data file containing only decimal numbers

I need to open it using an excel blank '.xsl' file that would insert the data
into it

I have tried a number of things to no avail and I think it should be straight
forward since ".csv" is a native format to excel

How do you read in a csv data file into an opening excel one?

Can anyone point me to some example code?
 
Albretch,
If you double click on the .csv, does it open in Excel OK ?

NickHK
 
workbooks.Open "C:\Myfolder\Mydoc.csv"

would be the VBA. If you want to import into an existing file, then turn
on the macro recorder and import it through Data=>Import External Data.

When the data is in, turn off the macro recorder and look at the code
recorded.
 

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

Back
Top