+ Reply to Thread
Results 1 to 4 of 4

workbook saveas function, xlText file format

  1. #1
    Massimo Bassini
    Guest

    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. #2
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    > 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. #3
    Volker
    Guest

    Re: workbook saveas function, xlText file format

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



  4. #4
    Tom Ogilvy
    Guest

    Re: 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" <[email protected]> wrote in message
    news:[email protected]...
    > Add to your SaveAS object the property Local:=True
    > Regards Volker
    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1