Multiple csv files from multiple wikipedia pages

Hi, I wanted to make workflow which will take one specific table from every page about F1 season(“Schedule of events”).
So I made While loop which go from 2014 to 2018, find this specific table and get data with Data Scraping, then just extract it to csv. I wanted to make it, that every season has his own csv file. My problem is that I don’t know how to reset ExtractDataTable variable in every step, because data is appending to the end of this variable and each next season has data from all previous seasons.
I triead to set ExtractDataTable to Nothing, but UiPath throw error.

How should I do this?

This is my first comment here, I’m glad that I would be part of UiPath community.

After you extract a Table, write it to a new CSV in every loop, so you have all seasons in several files. It’s a way to do it :slight_smile:

I write it in a new csv, so that’s not the problem. Each step new csv file is created with name “YYYY F1 season.csv”.
Unfortunately I can’t add my workflow here, it would probably help to explain me what I’m doing wrong.

Have you tried with yourDataTable.Rows.Clear() Method after you write to CSV File?

Ah, I feel so stupid now, simple “Clear Data Table” activity is enough here. Thanks for your help asesor-rpa.

Hi @mar123zaj
Well this can be handled with a activity called CLEAR DATATABLE Activity, where we can mention the datatable as input, that we want to clear all the records and keep only the datatable structure…i.e., only the columnname

This would clear the extracted table and would let add mew records without getting appended
Hope this would help you buddy

Cheers @mar123zaj

Hi @Palaniyappan you probably overlooked my last post, but thanks for your response.

1 Like

aaha, fine
Cheers @mar123zaj

:slight_smile: @mar123zaj