CSV Format and list separator
Posted by Jose Antonio Gonzalez on March 16, 2001 1:34 AM
I want to save an Excel sheet in CSV format (list separator should be ; due to european number format used and although regional settings are set to English (United States) the list separator is changeg from , to ; ).
When doing manually I get this in the CSV file (account number; amount with two decimals;debit o credit; concept):
700000300;676961,00;H;Ventas dia 05-March-2001
But when recording and playing the macro this is what I get:
700000300,"676961,00",H,Ventas dia 05-March-2001
The procedure I do is select the range, copy, open new book, paste special value and save as CSV.
This is the code from the macro:
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
Application.CutCopyMode = False
ActiveWorkbook.SaveAs FileName:=Nombre, FileFormat:=xlCSV, _
I do not understand why doing manually I get what I want but not when playing the macro (the list separator is changed to , intead of ; and therefore " is used for separating the number.
Jose Antonio Gonzalez
Hotel Maria Cristina RES 086 - FRS 347 - SAP F220