+ Reply to Thread
Results 1 to 6 of 6

Semicolon Delimiter instead of comma ?

  1. #1
    Registered User
    Join Date
    05-03-2010
    Location
    The Moon
    MS-Off Ver
    Excel 2003
    Posts
    9

    Semicolon Delimiter instead of comma ?

    Hi
    I have been using Jerry Beaocaire's code to output CSV files, and it works great, except for 2 problems:
    1: The delimiters being Comma, and I need them to be Semicolon. I have tried altering the code to FileFormat:=xlCSVMSDOS. But it makes no difference, I have also tried altering the windows setting, but it doesn't seem to affect it at all.

    Is there any way to alter the code to use Semicolon instead of Comma ?

    2: Im using this
    Please Login or Register  to view this content.
    And it seems to break the code to make the CSV files. Any suggestions on how to solve this. I was thinking maybe two buttons, one to sort with the above code(removing the macro from the worksheet), and one to make the CSV files.

    Thanks for all help
    Last edited by arlu1201; 01-03-2013 at 06:00 AM.

  2. #2
    Forum Contributor wamp's Avatar
    Join Date
    11-10-2008
    Location
    Norway
    MS-Off Ver
    97, 2000 & 2003 (diff. workstations)
    Posts
    184

    Re: Semicolon Delimiter instead of comma ?

    Hi.
    I can't find a way to save csv with ";" instead of commas using "saveas"..
    however, I would recommend reading this for a solution on how to export to any textfile, using any separator you want.
    the code is highly customizable :-)
    _______________________________________________
    Remember:

    Read the rules!

    Use code tags! Place [CODE] before the first line of code and [/CODE] after the last line of code.

    Mark your post [SOLVED] if it has been answered satisfactorily.
    To do this, click EDIT in your original post, click GO ADVANCED and set the PREFIX. It helps everybody!

    If you are approve (or disapprove) of any members response to your problem, please click the star icon underneath their post and comment. It matters.

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Semicolon Delimiter instead of comma ?

    You could open the file in a text editor like notepad and just replace all the commas with semi-colons.

    Other than that to do it in Excel concatenate your cells together with the semi-colon and paste special them to a new worksheet, save that as a text file with the required file extension.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Semicolon Delimiter instead of comma ?

    In Excel 2007 you can indicate which delimiter /separator you want to use.
    In Excel< 2007 it is dependent on the language-version you are using. Although MS didn't provide a 'moon'version, a European version automatically uses ; the American/English version ,
    Adjusting the textfile may then be the only option left.

  5. #5
    Registered User
    Join Date
    05-03-2010
    Location
    The Moon
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Semicolon Delimiter instead of comma ?

    Quote Originally Posted by snb View Post
    In Excel 2007 you can indicate which delimiter /separator you want to use.
    I have 2007, where do I change this ?

  6. #6
    Registered User
    Join Date
    11-02-2012
    Location
    Curitiba/Brazil
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: [SOLVED] Semicolon Delimiter instead of comma ?

    Hi there,

    I'd the same problem... and i didn't found a solution anywhere... But i found my own solution that worked for me!!!!

    I'm brazilian, i use the office in english language because it is easier to study and solve problems when they appear... but the csv files in brazil use semicolons to separate the data.

    looking at the syntax of the open command, i saw the "LOCAL" parameter...

    "True saves files against the language of Microsoft Excel (including control panel settings). False (default) saves files against the language of Visual Basic for Applications (VBA) (which is typically United States English unless the VBA project where Workbooks.Open is run from is an old internationalized XL5/95 VBA project)." (Excel Help)

    Then, i put "local:=true" at the syntax and finally worked for me!!!! (But works because my excel and region are to use ";" for list separators.)

    Please Login or Register  to view this content.
    Best Regards

    Gerez
    Last edited by GerezOffice; 01-02-2013 at 12:08 AM.

+ 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