Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing a quotation mark in a text file
Hello,
please help with producing something like this in a text file from VBA: aaa "bbb" I am trying with exestr="aaa \"bbb\"" Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("H:\qq.bat", True) a.writeline (exestr) a.Close It is a question of escaping characters in VBA. Or if you could tell me how to pass an argument containing spaces to a script (python,perl,R) from VBA? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing a quotation mark in a text file
I'd use chr(34) as the double quotes
"stephen" wrote: Hello, please help with producing something like this in a text file from VBA: aaa "bbb" I am trying with exestr="aaa \"bbb\"" Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("H:\qq.bat", True) a.writeline (exestr) a.Close It is a question of escaping characters in VBA. Or if you could tell me how to pass an argument containing spaces to a script (python,perl,R) from VBA? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing a quotation mark in a text file
Try this exestr=""" & "aaa \"bbb\" & """ &
"stephen" wrote: Hello, please help with producing something like this in a text file from VBA: aaa "bbb" I am trying with exestr="aaa \"bbb\"" Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("H:\qq.bat", True) a.writeline (exestr) a.Close It is a question of escaping characters in VBA. Or if you could tell me how to pass an argument containing spaces to a script (python,perl,R) from VBA? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
printing a quotation mark in a text file
Oops this works better!
exestr = "aaa\" & """" & "bbb\" & """" "JRForm" wrote: Try this exestr=""" & "aaa \"bbb\" & """ & "stephen" wrote: Hello, please help with producing something like this in a text file from VBA: aaa "bbb" I am trying with exestr="aaa \"bbb\"" Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("H:\qq.bat", True) a.writeline (exestr) a.Close It is a question of escaping characters in VBA. Or if you could tell me how to pass an argument containing spaces to a script (python,perl,R) from VBA? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save Excel file to CSV with quotation mark data delimeter? | Excel Discussion (Misc queries) | |||
Single Quotation mark in CSV | Excel Discussion (Misc queries) | |||
Excel CSV file: How to preserve double quotation mark on Unix ftp? | Excel Discussion (Misc queries) | |||
how do I concatenate text that has a quotation mark | Excel Discussion (Misc queries) | |||
chr() for quotation mark | Excel Programming |