Page 1 of 1

comma-text conversion

Posted: Wed Sep 09, 2015 8:43 pm
by rgonzalez
Hello, I'm using Windows 10 (just upgraded) and Office 2013 and I'm having a problem trying to use a Comma-text conversion since robotask takes spaces as delimiters if they are not enclosed by quotes.

This is an example of a file that I want to export to csv from excel 2013
1.PNG
1.PNG (3.19 KiB) Viewed 14853 times
This is the file opened in notepad
2.PNG
2.PNG (3.67 KiB) Viewed 14853 times
Theres no quotes added to columns with spaces, this didn't happen when I was using Windows 7 and Office 2013.

And my list separator on regional options is the same as before (a comma)

Code: Select all

,
Is there a way to tell robotask not to take spaces as list separator or a way to force excel to add quotes to columns with spaces?

Thank you.

Re: comma-text conversion

Posted: Thu Sep 10, 2015 7:07 am
by Oleg
You can convert your string to standard comma-separated string by using Delimit variable action

Also see my example:

Code: Select all

;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|379259420
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task10"
Hide=INTEGER|0
ID=INTEGER|15394252
LogOnAsUser=INTEGER|1
Name=STRING|"Convert to standard comma separated"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TEXT"" with value ""rafa rafa,123,rafa rafa rafa,456,""rafa,rafa"""""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"TEXT"
varvalue=STRING|"rafa rafa,123,rafa rafa rafa,456,""rafa,rafa"""

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{text}"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{text}"
msg1=STRING|"********************"
msg2=STRING|"{text(0)}"
msg3=STRING|"{text(1)}"
msg4=STRING|"{text(2)}"
msg5=STRING|"{text(4)}"
msg6=STRING|"{text(5)}"
msgcount=STRING|"7"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_DELIMITED"
Enabled=INTEGER|-1
Name=STRING|"Delimit Variable"
Params=FOLDER

[Actions\Action3\Params]
colon=STRING|"0"
comma=STRING|"1"
other=STRING|"0"
quote=STRING|"0"
semocolon=STRING|"0"
space=STRING|"0"
spaceasone=STRING|"0"
string=STRING|"{text}"
tab=STRING|"0"
variable=STRING|"text"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{text}"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"{text}"
msg1=STRING|"*****************"
msg2=STRING|"{text(0)}"
msg3=STRING|"{text(1)}"
msg4=STRING|"{text(2)}"
msg5=STRING|"{text(4)}"
msg6=STRING|"{text(5)}"
msgcount=STRING|"7"
playsound=STRING|"0"
showmessage=STRING|"1"

Re: comma-text conversion

Posted: Fri Sep 11, 2015 5:55 pm
by rgonzalez
Thank you! This works great! :roll: