Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default workbook saveas function, xlText file format

I've got the following problem.
I create a new workbook (single sheet) processing an original workbook.
The "new" workbook is very simple: 3 columns, a description and two numbers
columns.
I get the problem when I save the new workbook via VBA with the saveas
function as in follows
new_workbook.saveas Path, xlText

The execution produces a file where decimal separator is always "." despite
regional settings.
The strange thing is that if I "save as" the workbook from Excel main menu,
selecting TXT format, the resulting file is correct with decimal separator
that follows regional settings.

I get the same problem with Excel 2000, XP, 2003.
Format of the number cells doesn't affect the result.
Any suggestion?

Regards

Massimo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default workbook saveas function, xlText file format

In xl XP, 2003, go into Tools=Options=Internation tab and define your
decimal separator.

I believe this will change the behavior in VBA. In xl2000, I think you
don't have this option.

You might want to write the file yourself using low level file IO.

--
Regards,
Tom Ogilvy

"Massimo Bassini" wrote in
message ...
I've got the following problem.
I create a new workbook (single sheet) processing an original workbook.
The "new" workbook is very simple: 3 columns, a description and two

numbers
columns.
I get the problem when I save the new workbook via VBA with the saveas
function as in follows
new_workbook.saveas Path, xlText

The execution produces a file where decimal separator is always "."

despite
regional settings.
The strange thing is that if I "save as" the workbook from Excel main

menu,
selecting TXT format, the resulting file is correct with decimal separator
that follows regional settings.

I get the same problem with Excel 2000, XP, 2003.
Format of the number cells doesn't affect the result.
Any suggestion?

Regards

Massimo



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default workbook saveas function, xlText file format

Add to your SaveAS object the property Local:=True
Regards Volker


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default workbook saveas function, xlText file format

Good one. I forgot that was added in xl2002 and later - knew something was
<g

--
Regard,s
Tom Ogilvy

"Volker" wrote in message
...
Add to your SaveAS object the property Local:=True
Regards Volker




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
How do I set default Excel Saveas file format to xlsx not xlsx Greg Conway Setting up and Configuration of Excel 1 September 17th 08 04:19 PM
VBA Using FileFormat:=xlText [email protected] Excel Discussion (Misc queries) 0 March 26th 08 04:02 PM
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
Workbook.SaveAs Paul Excel Programming 2 August 25th 03 08:12 PM
overwrite Excel SaveAs function from File menu susie Excel Programming 1 July 31st 03 04:47 AM


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