Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 193
Default CSV separator in macro?

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default CSV separator in macro?

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

--
Regards,
Tom Ogilvy


"Pete" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use 100 separator inspite of 1000 separator in excel Montu Excel Worksheet Functions 11 May 2nd 23 11:41 AM
Separator M.K. Saroy Excel Discussion (Misc queries) 2 November 20th 09 10:37 AM
list separator widman Excel Discussion (Misc queries) 3 November 5th 07 03:12 PM
hundreds separator Viraj Nayaka Excel Discussion (Misc queries) 2 September 6th 06 12:09 PM
Decimal separator jacob[_3_] Excel Programming 0 September 25th 03 09:38 AM


All times are GMT +1. The time now is 07:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"