Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.fr.excel,microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Need help : Open a csv file with semicolon separation

Hello everybody,

I need to open a csv file with semicolon separation but the separation
used is always the comma.

I tried this differents methods :

- Workbooks.OpenText Filename:="D:\Excel\data\file.csv",
Semicolon:=True, Comma:=False

- Workbooks.open Filename:="D:\Excel\data\file.csv", Format:=4

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";"

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";" ,
Format:=4

If I rename the file as a text file, it works !!!

If anyone has an idea, i want to properly develop and (if possible)
don't want to change the file type
  #2   Report Post  
Posted to microsoft.public.fr.excel,microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Need help : Open a csv file with semicolon separation

hello

the trick i've found is to convert the data after importation


Workbooks.Open Filename:= _
"D:\Excel\data\file.csv"

Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited,
_
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=True, Comma:=False, Space:=False, Other:=False

"Yann59" a écrit dans le message de
om...
Hello everybody,

I need to open a csv file with semicolon separation but the separation
used is always the comma.

I tried this differents methods :

- Workbooks.OpenText Filename:="D:\Excel\data\file.csv",
Semicolon:=True, Comma:=False

- Workbooks.open Filename:="D:\Excel\data\file.csv", Format:=4

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";"

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";" ,
Format:=4

If I rename the file as a text file, it works !!!

If anyone has an idea, i want to properly develop and (if possible)
don't want to change the file type



  #3   Report Post  
Posted to microsoft.public.fr.excel,microsoft.public.excel.programming,microsoft.public.excel.misc
external usenet poster
 
Posts: 27,285
Default Need help : Open a csv file with semicolon separation

Chip Pearson has written code to allow you to open a CSV file and specify
the delimiter:

http://www.cpearson.com/excel/imptext.htm import/export text files

--
Regards,
Tom Ogilvy

"Yann59" wrote in message
om...
Hello everybody,

I need to open a csv file with semicolon separation but the separation
used is always the comma.

I tried this differents methods :

- Workbooks.OpenText Filename:="D:\Excel\data\file.csv",
Semicolon:=True, Comma:=False

- Workbooks.open Filename:="D:\Excel\data\file.csv", Format:=4

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";"

- Workbooks.open Filename:="D:\Excel\data\file.csv", Delimiter:=";" ,
Format:=4

If I rename the file as a text file, it works !!!

If anyone has an idea, i want to properly develop and (if possible)
don't want to change the file type



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
Saving Excel sheet as a semicolon delimited file (.csv) e_dog95 Excel Discussion (Misc queries) 1 February 18th 06 11:02 PM
Converting Excel data into semicolon delimited text file danmcgov Excel Discussion (Misc queries) 1 April 14th 05 04:30 PM
Export excel file to semicolon delimited text file capitan Excel Discussion (Misc queries) 5 April 7th 05 03:06 AM
save a csv file with SEMICOLON delimiters mariofontaine Excel Programming 2 May 5th 04 03:38 PM
ADO & semicolon delimited text file? raj Excel Programming 4 January 6th 04 08:31 PM


All times are GMT +1. The time now is 08:17 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"