CSV separator in macro?

P

Pete

I've changed the list separator to semicolon. Now I try to open csv file
(delimited by semicolons) from macro with command: Workbooks.Open
FileName:="filename.csv", but it doesn't work. The entire row open to first
cell. how can I tell in open command the separator is semicolon?
 
T

Tom Ogilvy

Use the OpenText method instead. Also, you will probably need to rename the
file to have a .txt extension. sometimes Excel makes its own decisions when
opening .CSV files.

or you can use Chip Pearson's code (or write your own)
http://www.cpearson.com/excel/imptext.htm import/export text files
 

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