Trying to make a Excel List from FakeNameGenerator.com - Any Suggestion?

Hi folks

I am trying to create a list from
https://www.fakenamegenerator.com
It is just for learning purposes and make some exercise in UiPath.

1-I made a "Open in Browser " action first.
2- I have put the “Get Text” activities and set for each of them a variable (like Name, Address, Phone number and Date of Birth.)
3-After that I created an empty excel file .There are only column names in the excel file.Such as
Name, Address, Phone number and Date of Birth.
4- I have put an “Excel Application Scope” activity
5- After that Read Range activity inside the Excel Application Scope and created a DataTable variable for the read range activity.

Bu I don’t know what to do next. I think I’ve set up all the things wrong. Please assist me if you have an idea.
Thanks.

Steps 1 and 2 are correct, but you will not need to make an empty excel file.

Before steps 1 and 2, create a Datatable containing the columns you want to populate. For step 3, write the data from step 2 to each column of a new row in the datatable. This as well as getting additional fake name data should be done repeatedly until you have the total fake names you want to generate (use a For Each loop to do this multiple times).

Lastly (and outside of the For Each loop, use Write Range to write the datatable to the Excel file. You will not need Excel Applications Scope to do this.

I couldn’t make the data table part. Can you help me please. Here is the file that I’ve made so farGetRandomNames.xaml (14.0 KB)

You need to build the datatable before opening the browser. It looks like you’re on the right track for using Build Datatable, but you’ll also need to output a datatable object in the output of the activity.

Hey @Anthony_Humphries .
Thanks for your assistance.
Finally I was able to extract the data from the website. But I was able to write the data in a csv file not in a excel file.

1- Unfortunately it throws an error when it tries to write the data into the Excel file. Here is the screenshot for the error.


2- The second problem that I’m facing with is while writing the data into the csv file. The address part seems empty in the csv file.
csv
I think it’s because of the selector. I tried the unselected items in the selector as well. It didn’t work though.

Here is the screenshot in the UI Explorer:

Thanks…

I found the issue. Actually it exist in the file. But there are spaces at the beginnig of the sentence and end of it as well. But what should I write in the assign activity to delete the spaces.

For example I used this to delete the hypens between the phone numbers.
phone.Replace("-","").ToString
phone

You can remove leading and trailing spaces of any string this way:

If MyAddr contains the address, then assigning MyAddr to MyAddr.Trim will remove the leading and trailing spaces.

As for the Excel issue, if you use the Write Range activity under System rather than Excel, it should work.

1 Like

Hi @Anthony_Humphries . Thanks for your reply. Finally I solved the problem with your help. It works totally fine. Thanks a lot

I am trying to learn the most common functions from microsoft website for VB.Net. I think I’ve got a long way to learn most of them :slight_smile: If you have any suggestions I’d like to hear it

You can get help on a lot of these from the Microsoft documentation and from these forums. The RPA foundation course also teaches about the quintessential vb.net functions on the academy website.

academy.uipath.com

Yes I actually started the foundation course in UiPath Academy. I’m at the Data Manipulation right now. This course really useful.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.