Ok. So from Web Scrap I get 8 rows, I decided to use MessageBox to understand how much data is saved in DataTable (variable – buildData)
buildData.Rows.Count
It returned 1
Then I tried to export it into Excel by using WriteRange activity. It doesn’t work – Excel file is Empty, there is a Sheet1, but no data.
So the question is – if the data get scraped from web (8 rows), why it doesn’t get saved in DataTable (buildData)? That’s probably why WriteRange doesn’t work, because there is nothing to export?
Just a clear thing in the screenshot,
You build an empty datatable (builddataTable) , and get data from the web (ExtractedDataTable)
so, if you write ExtractedDataTable in the excel, it will write data, but you are not adding any data from the extracted data to empty data table. So, it won’t write any data.
ok.So I added Assign and Add Column activities…but it gives me error Assign: Cannot find column 0 (which means data has not been loaded from ExtractDataTable to DataTable (dataBuild))
While I reviewed your code, there is incorrect config for build datatable and then adding columns. Try correcting that as per your column needs. Code will work
yea, I thought that too… so how to do it correctly?
I need to build the process when I have list of URLs from Excel, so I need it to open browser > scrap data > save 8 rows of data vertically in A1,A2…A8, and next URL scrap data and save it next column in Excel B1,B2…B8.
But I don’t understand how to put scraped data to the DataTable dynamically in next next next column.
Do something like, in write range, use a array and in that define A, B, C and count numbers so when the first time loop will run, it will take A, next time B etc