PDA

View Full Version : problem with CSV output



duxis
11-22-2008, 12:08 PM
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

GTO
11-22-2008, 02:06 PM
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

duxis
11-24-2008, 05:16 AM
GTO, thank you for your effort, the problem is solved already.