Need some help, I’ve successfully created a Flowchart to go to a website, scrape the info, but have been unsuccessful in getting the info to be written to a CSV file.
Hi
Welcome to uipath community
We can directly use Write CSV activity where we can pass the extracted datatable as input and mention the CSV file path on where we want to write this datatable as CSV
For more info in this
https://activities.uipath.com/docs/write-csv-file
Cheers @christopher_cole
I see that you are using Output Data Table activity at the end. Output Data Table activity will convert the data table to a string value. It will not really write into a CSV file. You need to use the Write CSV activity to write the data table to a csv file. You can remove the output data table as it is nto required to write the data to a csv.
Is the “Write Line” not needed as well?
Well I hope That’s not necessary
But if you feel to have a view of the datatable then we can use that after converting that to a string and we cannot directly mention a datatable like string with .Tostring so for that use output datatable activity where pass the input as datatable and output as a string variable and we can mention that string variable in the write line
But right now to the flow it can be like
—Flow Start
—Open Browser
—Data scrapping
—write csv file activity
If we want to see the datatable as a view in output panel
Then be like
—Flow Start
—Open Browser
—Data scrapping
—write csv file activity
—output datatable activity (with the extracted datatable as input)
— writeline activity
Hope this would help you
Cheers @christopher_cole
Ok, I’ve edited it to reflect
Flow Start, Open Browser, Data scrapping and write csv file
Executed it, and getting this error in screenshot in red
Fine
In the variable panel for the variable ExtractDatatable change the scope to the whole sequence
Scope is the issue here
Hope this would help you
Cheers @christopher_cole
Got it, made the change and it works. Thank you