Get data from Website and Type the into Excel. The Data should be entered in the immediate empty row in the sheet

Hi everyone !

As mentioned in the title, I am trying to get the data from website using data scrapping. I am able to easily extract the data.

I am facing problems in entering the data into excel sheet.

The data extracted from website is of fixed format and needs to go into particular column of the excel sheet. My requirement is two fold :-

  1. Insert the data into there corresponding fields
  2. Inserting the data into the NEXT IMMEDIATE EMPTY ROW.

Please suggest solutions.

1 Like

The Append Range activity should place new data into the next empty row. Pass in your DataTable obtained from scraping and see if that works for you.

How should I pass the extracted data into append range activity ?

Append Range takes a datatable so you would need to construct a DataTable with your information. If you use the Data Scraping wizard a DataTable result is automatically generated for you.

Hi buddy
you can use APPEND RANGE activity where you can pass the datatable extracted from data scrapping as input and that would add the data to first staring empty row as you want
for more into on this activity here you go

Cheers

Well apologies , I forgot to mention the that instead of using Data Scraping I am using Get Text activity.
The website has only one row, which intend to extract.

Data Scrapping activity is creating trouble as the data that its looking for some pattern for data extraction.

Any ideas ???

May i know the output of that get text looks like
you can check with a write line activity and take a screenshot and share here buddy
Cheers @Aditya_Bhalerao

Understood.

First, use a Read Range activity to read the existing contents of the Excel file. This will give you a datatable containing the Excel data.

Then, use your Get Text activity to scrape the text you are trying to find.
Use a Add Data Row activity to add the scraped data to the existing DataTable. That activity requires an ArrayRow or a DataRow (I usually use ArrayRow) so if you have one variable do {var1}, if you have two do {var1,var2}, etc. because they must be in Array format.

Then, once all of the data is added to the DataTable object you can use a Write Range activity. Use the same sheet name and “A1” as the cell to start from. This will overwrite the old data with the DataTable which contains all data, old and new.

Let me Try it and Get back to you.

@Palaniyappan and @DanielMitchell

This how the program looks like. After running it , the system threw an error.

image

image

Also I want the value taken from Get Text to be pasted in a particular column called Quantity.

refer excel sheet. Details.xlsx (8.6 KB)

1 Like

can i see the property of add data row once as a screenshot @Aditya_Bhalerao

1 Like

array row property should be like this buddy @Aditya_Bhalerao
if the get text output variable is named as GT2
{row(0),row(1),row(2),GT2.ToString}

Cheers

1 Like

Let me try and get back to you.

1 Like

sure that would work, if we are getting value from get text activity
Cheers @Aditya_Bhalerao

@Palaniyappan Buddy i want the value to be pasted in the column named “Quantity”.

Will this cater to that requirement ???

1 Like

yes it would
why any issue
Cheers @Aditya_Bhalerao

Please correct me if I am going wrong somewhere .

@Palaniyappan I suppose there is some error!!!

Use a for each row loop and place this do within that and pass the input as datatable output read from read range activity to this for each row loop
image

and keep the write range activity outside the for each row loop @Aditya_Bhalerao
Cheers