Apologies for newbie problem/question and hard to understand explaination.
Basically i have collected data from web using Data Scrapping, assigned it to DataTable variable and then by using “Write Range” saved into excel.
The problem is that UiPath saving everything to the one excel cell (default A1). My data is like below:
BMW - 100
AUDI - 200
FIAT - 300
and it is all saved in to the one cell in excel, when i would like to have saved as
Column 1 Column 2
Row 1: AUDI | 200
Row 2:FIAT | 300
Row 3: BMW | 100
Assuming you can’t find a way to directly generate the DataTable as expected from Data Scraping, you can solve the problem after you have the DataTable with all info in one column.
Build another DataTable with 2 columns, the use a For Each Row loop and do a string split on each row Item, and this resulting array you will add to the second DataTable as a row.
After you write range in excel of this second DT.
I have attached an example. DataScraping.xaml (11.3 KB) DataScrapeTest.xlsx (8.4 KB)
Sounds like your Data Scraping is not set up correctly and is pulling everything into one column/row. Show us your Data Scraping activity, its properties, and the result of the test window.
Okay i have done with MarinAlexandru method and now i have error:
“Input Array is longer that the number of columns in this table”
Trying to prompt on message box the value its just: system.string which suggests i have done something wrong. I would like to share the projekt like you did in .xaml file but i dont have that option. is this because im using Community version? How can i show my projekt guys?
Key points to remember when we do data scrapping -
1 - Try to put scrape data in notepad.
2 - Use generate data table activity and paste that notepad data and do preview.
During preview if you see data in single column try to use separators from the right side property of Generate data table window.
Once you do some work on it and finally it changes to rows and columns that you take it in data table.