Consulting

Results 1 to 3 of 3

Thread: problem with CSV output

  1. #1
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    2
    Location

    problem with CSV output

    Hello...

    I need a workbook to be saved as CSV file. When I save it manually in Excel it works fine.

    I have recorded this saving operation as a makro:

    ActiveWorkbook.SaveAs Filename:="Q:\OracleIP\SYSTEM_ITEMS.csv", FileFormat:=xlCSV, CreateBackup:=False

    but using this makro I'm still getting CSV file with some cells enclosed by quotation marks ("") and all the cells are divided by comma (,) instead of semicolon ( ; ), as it is divided when saving manually. I have tried other fileformats, like xlCSVMSDOS, xlCSVWindows, even xlCSVMac, but always with the same result.

    Here is the CSV output like I need it to be (saved manually, cells are divided by semicolon):
    V;TA;Tabula;124D;18,00;2000,0;6000;;11;;;;;TVa tabula 18.00x2000.0x6000 | S355J2G3 | okovinovy hladky;TVa tabula 18.00x2000.0x6000, akost S355J2G3, povrch okovinovy hladky;HR sheet 18.00x2000.0x6000, grade S355J2G3, surface plain;;kg;MTX;TOV-MTX;1;1;CREATE

    Here is the CSV output saved by makro (cells are divided by comma):
    V,TA,Tabula,124D,"18,00","2000,0",6000,,11,,,,,TVa tabula 18.00x2000.0x6000 | S355J2G3 | okovinovy hladky,"TVa tabula 18.00x2000.0x6000, akost S355J2G3, povrch okovinovy hladky","HR sheet 18.00x2000.0x6000, grade S355J2G3, surface plain",,kg,MTX,TOV-MTX,1,1,CREATE

    Can anybody help me, please?

    Duxis

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings duxis,

    As you already have a sheet with info to test the saveas against, presuming there's no company/private/secret info contained therein, could you post an example workbook with the problematic sheet included? This would make duplicating the problem easier.

    Thanks,

    Mark

  3. #3
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    2
    Location
    GTO, thank you for your effort, the problem is solved already.

Posting Permissions

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