Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I have some trouble with the csv export of an Excel document using VBA. When I save the document on a German computer using the command below it seperates the cells by semicolon, but if I do this no an English machine (XP, Office 2003) it uses comma insead. Why? And is there an easy workaround? Regards, Thomas ActiveWorkbook.SaveAs Filename:=Pfad_Datei, FileFormat:=xlNormal, CreateBackup:=False ' |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'd rename the file to .txt
Then use file|open. You'll see the text to columns wizard open up and you can specify delimited by a semicolon. You could also change your windows regional settings list separator to semicolon. Thomas Sedlaczek wrote: Hello, I have some trouble with the csv export of an Excel document using VBA. When I save the document on a German computer using the command below it seperates the cells by semicolon, but if I do this no an English machine (XP, Office 2003) it uses comma insead. Why? And is there an easy workaround? Regards, Thomas ActiveWorkbook.SaveAs Filename:=Pfad_Datei, FileFormat:=xlNormal, CreateBackup:=False ' -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thomas,
I believe Excel uses the ListSeparator that is defined in the Windows Regional And International Settings. Debug.Print Application.International(xlListSeparator) I don't think you can change what is used for CSV without changing the Windows Setting, which will affect all applications, not just your current session of Excel. You could roll your own SaveAsCSV procedure using the code in the "Export To Text Files" section on http://www.cpearson.com/excel/imptext.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Thomas Sedlaczek" <Thomas wrote in message ... Hello, I have some trouble with the csv export of an Excel document using VBA. When I save the document on a German computer using the command below it seperates the cells by semicolon, but if I do this no an English machine (XP, Office 2003) it uses comma insead. Why? And is there an easy workaround? Regards, Thomas ActiveWorkbook.SaveAs Filename:=Pfad_Datei, FileFormat:=xlNormal, CreateBackup:=False ' |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you Chip!
Well it seams that I have to put some code together. Suddenly the TextCodepage argument of the SaveAs methode is not used in the English Excel version. *arg* Thanks anyway! Thomas "Chip Pearson" wrote: Thomas, I believe Excel uses the ListSeparator that is defined in the Windows Regional And International Settings. Debug.Print Application.International(xlListSeparator) I don't think you can change what is used for CSV without changing the Windows Setting, which will affect all applications, not just your current session of Excel. You could roll your own SaveAsCSV procedure using the code in the "Export To Text Files" section on http://www.cpearson.com/excel/imptext.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email on the web site) "Thomas Sedlaczek" <Thomas wrote in message ... Hello, I have some trouble with the csv export of an Excel document using VBA. When I save the document on a German computer using the command below it seperates the cells by semicolon, but if I do this no an English machine (XP, Office 2003) it uses comma insead. Why? And is there an easy workaround? Regards, Thomas ActiveWorkbook.SaveAs Filename:=Pfad_Datei, FileFormat:=xlNormal, CreateBackup:=False ' |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ignore that first portion of my reply. That showed how to import the file--not
export. But you can change the list separator. Thomas Sedlaczek wrote: Hello, I have some trouble with the csv export of an Excel document using VBA. When I save the document on a German computer using the command below it seperates the cells by semicolon, but if I do this no an English machine (XP, Office 2003) it uses comma insead. Why? And is there an easy workaround? Regards, Thomas ActiveWorkbook.SaveAs Filename:=Pfad_Datei, FileFormat:=xlNormal, CreateBackup:=False ' -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Export Excel tuncating leading zeros while export to excel from da | Setting up and Configuration of Excel | |||
Chart.Export images are shrinking as I export more images | Charts and Charting in Excel | |||
export re-order input fields to export file [csv] | Excel Worksheet Functions | |||
If than Else Trouble | Excel Worksheet Functions | |||
Im in trouble!!! Please Help!! JS | Excel Discussion (Misc queries) |