View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default HOW TO: CONVERT CSV DELIMITED FILES TO XLS

See Chip Pearson's site for code that will read in a CSV file - you can
specify the delimiter:

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

You can loop through a directory with

sName = dir("C:\Myfiles\*.csv")
do while sName < ""
' call chips routine to open the file
' save the a file as xls
sName = Dir()
Loop



--
Regards,
Tom Ogilvy

"BHARATH RAJAMANI" wrote in
message ...
Can someone guide me how to write a macro that Loops through 'N' .CSV

files
in a desktop folder and saves them as .XLS files. It is important to
recognize the comma delimiter and throw the comma-separated individual

values
in different cells. If I use a normalExcel fileproperty then my xls file

has
all values in column A only.


TIA

Regards,

--
Manager, International Private Banking, International Banking Group, ICICI
Bank
East Wing 8th floor South, ICICI Towers, Bandra Kurla Complex, Mumbai

India
400051