Quote when i write CSV

Hi everyone !

I need you. I explain you :
I work with a data table, when my work is finished, i write the data table in a text file with the “Write CSV” Activity.

The problem is that when i open the text file, in each column i have several quotes like that :

"String " "String " " Test Whithout Quote "

Someone can help me please ! :slight_smile:

Regards,

Hi
welcome to uipath community
before validating in csv file we need to check once with the datatable as well
so once after processing with datatable use OUTPUT DATATABLE ACTIVITY and mention the datatable as input and get the output with a variable of type string named str_output
–now use a WRITE LINE Activity and mention the above string variable as input so that we would be able to see the value of the datatable in the output panel
kindly share that screenshot if possible

Cheers @BCdev

1 Like

Maybe i can explain you more :

I work on text file. I generate a data table with this texts files (with generate data table activity).

Regards,

Fine
using Generate datatable activity wont add double quotes to the terms
as you say you were able to process those datatable then text file wont have any issues
ok if possible can i have a view on that text file a screenshot
Cheers @BCdev

1 Like

Thanks for your reply.

My text file before the generate of data table :

I open the text file with notepadd ++

Hope these steps were followed along your sequence
–use READ TEXT FILE activity and get theoutput with a variable of type string named str_input
–now use a GENERATE DATATABLE activity and pass the above string variable as input
and get the output with a variable of type datatable named dt
–now use a FOR EACH ROW activity and pass the variable dt as input and inside that we can process the data as we want
–followed by this for each row use WRITE CSV activity and pass the above variable dt as input so that it will right to the csv file path mentioned

Cheers @BCdev

1 Like

Yes, is what i’m doing. But when i use write CSV activity with my dt as input, i have this result :

This is an example of course.

kindly try to open with a excel application and check with this csv file
whether it is showing those double quotes or not
or if possble can i have that text file so that i could simulate the process and provide you
Cheers @BCdev

1 Like

I have no probleme when i put the data table in an excel file.

I can’t upload a file because i’m new… There is another way to send you my text file ?

Regards,

@Palaniyappan

i hope you can message me here in forum with the files

Cheers @BCdev

@Palaniyappan

No i can’t… I don’t know if private message exist ?

Regards,

here you go with a sample xaml
hope this would helpyou
bjdevv.zip (16.2 KB)

Cheers @BCdev

1 Like

Thank you ! it works ! :slight_smile:

1 Like

On the contrary, I want to keep double quotes when writing CSV files. But the result hasn’t. My steps are as follows:

  1. execute query, extract data from oracleDB and output to DataTable.
  2. write csv file, write the DataTable to a csv File.
    Anybody can help me for this situation? Thanks anyway.

Hi @whzhu,

You don’t need to use"output to DataTable" Activity. Just work on your DataTable and write directly your Data with “Write CSV” Activity.
Maybe share us a screen of your process.

Regards,

Hi BCdev,
Acctually, I didn’t use “output to Data Table”.
What I used are

  1. execute query from db and store the result into a DataTable
  2. write the DataTable into csv file.
    The target is : “AccountFile_100001_20191106”,“15947”
    But the reality is : AccountFile_100001_20191106,15947

here is the screen of my process.
screen

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.