As part of my exercise, I have done data scraping on a site and exporting it to a csv file. Now, I want to add an extra column in the CSV file with a value called prices. this price is not part of the main page, which is of secondary page. however, it’s fetching its values. But I want it append to existing CSV or add it.
I had searched in other forums here. some had suggested to use Add Data Row or Add Data column. I tried it unable to proceed further.
Also, I am unable to attach workflow here. since it says I am the first time user.Not allowing me to attach.
Goto a particular website, search for mobiles and URL via data scraping, click on Product and Fetch the prices, collect the other information not present in main page and populate the same data in Column A, Column B and Column C.
Column A and Column B are taken from Data Scraping and Column C value fetched separately and should be added to Data Scraped and Exported CSV.
if this stored as a datacolumn variable then we can use ADD DATA COLUMN activity where we can mention the datacolumn variable and the datatable variable where we want to add this
Goto a particular website, search for mobiles and URL via data scraping, click on Product and Fetch the prices, collect the other information not present in main page and populate the same data in Column A, Column B
Upto Here - You have a Excel/ CSV with Column A, Column B.
Use ReadRange on the above Data . This will give you a DataTable . (Say DT1).
For Column C value fetched separately and should be added to Data Scraped and Exported CSV.
Read the Column C Data into a Other DataTable (Say DT2).
Now you have 2 DataTable.
DT1 - with Column A and Column B
DT2 - With Column C
use JoinDataTable Activity -Join the Datatable using the common Key (common_column)
Store the result into a new DataTable(OutputDT)
5.Write the Datatable (OutputDT) to excel
You can Swich between JoinType as per your requirement
Data Table is stored as “ExtractDataTable” variable
Second Page Click Captures the Prices stored as Integer variable. called Prices
As detailed above
I added for Add Data Column Properties with below
Column : Prices Error Thrown At properties → (Value Type Integer cannot be converted to System.data.datacolumn) --I tried converting integer to string still noLuck
DataTable: ExtractDataTable (This got accepted)