Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default .XLS to .CSV Macro Conversion

My company has recently upgraded us from Windows2000/Excel2000 to
WindowsXP/Excel2003.

I am having a problem converting .xls to .csv that uses ";" semicolon as the
separator.

The Regional Setting for List Separator is ";" semicolon.

My old code is this:

Awb.SaveAs Filename:=Left(Awb.Name, Len(Awb.Name) - 4), FileFormat:=xlCSV

This issue seems to be specific to the code I am using - I have tried to
manually save an xls file to csv and it worked fine.

Is there a way to fix my code so that the .csv uses ";" as the separator ?

Thank you in advance.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default .XLS to .CSV Macro Conversion

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

==============
Take a look at Earl's program. I bet it does what you want.

carl wrote:

My company has recently upgraded us from Windows2000/Excel2000 to
WindowsXP/Excel2003.

I am having a problem converting .xls to .csv that uses ";" semicolon as the
separator.

The Regional Setting for List Separator is ";" semicolon.

My old code is this:

Awb.SaveAs Filename:=Left(Awb.Name, Len(Awb.Name) - 4), FileFormat:=xlCSV

This issue seems to be specific to the code I am using - I have tried to
manually save an xls file to csv and it worked fine.

Is there a way to fix my code so that the .csv uses ";" as the separator ?

Thank you in advance.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 361
Default .XLS to .CSV Macro Conversion

Thanks Dave. You have been very helpful now and in the past.

This sounds like a glitch in the excel 2003 ?

"Dave Peterson" wrote:

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

==============
Take a look at Earl's program. I bet it does what you want.

carl wrote:

My company has recently upgraded us from Windows2000/Excel2000 to
WindowsXP/Excel2003.

I am having a problem converting .xls to .csv that uses ";" semicolon as the
separator.

The Regional Setting for List Separator is ";" semicolon.

My old code is this:

Awb.SaveAs Filename:=Left(Awb.Name, Len(Awb.Name) - 4), FileFormat:=xlCSV

This issue seems to be specific to the code I am using - I have tried to
manually save an xls file to csv and it worked fine.

Is there a way to fix my code so that the .csv uses ";" as the separator ?

Thank you in advance.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default .XLS to .CSV Macro Conversion

I remember earlier versions of excel behaving the same way. Am I
misremembering?

But I'd say it was more VBA being USA centric.

(It's only a bug if you don't use the comma as your delimiter <vbg.)


carl wrote:

Thanks Dave. You have been very helpful now and in the past.

This sounds like a glitch in the excel 2003 ?

"Dave Peterson" wrote:

Maybe you could write your own exporting program that would behave exactly the
way you want:

Here are three sites that you could steal some code from:

Earl Kiosterud's Text Write program:
www.smokeylake.com/excel
(or directly: http://www.smokeylake.com/excel/text_write_program.htm)

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(or maybe you could build your own formula and copy|paste into Notepad.)

==============
Take a look at Earl's program. I bet it does what you want.

carl wrote:

My company has recently upgraded us from Windows2000/Excel2000 to
WindowsXP/Excel2003.

I am having a problem converting .xls to .csv that uses ";" semicolon as the
separator.

The Regional Setting for List Separator is ";" semicolon.

My old code is this:

Awb.SaveAs Filename:=Left(Awb.Name, Len(Awb.Name) - 4), FileFormat:=xlCSV

This issue seems to be specific to the code I am using - I have tried to
manually save an xls file to csv and it worked fine.

Is there a way to fix my code so that the .csv uses ";" as the separator ?

Thank you in advance.


--

Dave Peterson


--

Dave Peterson
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
link to combobox legepe Excel Discussion (Misc queries) 4 July 26th 06 04:45 PM
data truncates when converting .csv to .xls sergio Excel Discussion (Misc queries) 5 November 26th 05 01:32 PM
convert from .xls format to .csv format m_ravindran Excel Discussion (Misc queries) 1 November 9th 05 11:22 AM
.CSV File into .XLS file acyakos Excel Discussion (Misc queries) 5 April 7th 05 12:50 PM
can i save an existing .xls file as a .csv file using command line craigkan Excel Discussion (Misc queries) 2 February 18th 05 02:01 PM


All times are GMT +1. The time now is 05:07 PM.

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"