Data from excel to website

Hi All,
Im trying to iterate 5 values from excel sheet “sheet1” and paste it into website application, after searching each and every values in search box, again I need to get the “ABN status” (i.e., from website) of particular number and want to update in same excel sheet. I have attached the excel sheet as well as my .xaml file.

Please help me in this regards.

Website link: https://abr.business.gov.au

below is the excel sheet, as I dnt have attachment option:

ABN code of supplier ABN Status as per (https://abr.business.gov.au)
85140502426
38302908974
23 119 320 286
58 151 721 980

1 Like

After search, use Get Text activity (indicate the status on web page) to get the status of ABN.

And then use Write cell activity to write the status into an Excel File.

Declare one variable and initialise to 0, intCounter = 0

For Each row in DataTable
    //assuming the data is in column A
    //ABN status to update in column B
    intCounter = intCounter + 1
    searchString = row(0).ToString //ABN Code
    Search in WebPage sequence
    strStatus = Get Text Activity to read the ABN Status
    //update in Column B
    Write Cell Activity, value = strStatus ; Address = "B" + intCounter.ToString
Next

Regards,
Karthik Byggari

2 Likes

Hi @farook2

Welcome to uipath community
Hope these steps could help you resolve this
— use a excel application scope and pass the file path of the excel
— use read range activity and get the output with a variable of type datatable named outdt
—use a for each row loop and pass the above variable as input
— inside the loop use a assign activity like this
Out_value = row(“yourcolumnname”).ToString
Where Out_value is a variable of type string
— now use a open browser activity and mention url in a string format
— change the browser type as IE property panel of open browser activity as IE is more reliable than other with uipath
— now use a type into activity and mention the input as Out_value.Tostring.Trim
—enable simulate type, clickbeforetyping and emptyfields property of type into activity
— and once after typing it we can get the value of the ABN either with a get text activity ( if we are able to access each text as individual element ) or we can use screen scrapping option from design tab in the studio window (if we are not able to access as a element rather only as a image) or with scrape relative option, anchor base activity and many based on the requirement and the page from from the data is obtained
—the obtained output should be stored in a string variable named ABN_value
— now use a assign activity and mention like this
row(“yourABNcolumnnname”) = ABN_value.ToString.Trim

— now after this for each row loop use a kill process and mention the process name as “EXCEL” in the property panel
—next use a write range activity under workbook activity and mention the sheet name, excel file path and range as “” and input datatable as outdt

Simple isn’t it
Hope this would help you
Kindly try this and let know for any queries or clarification
Cheers @farook2

2 Likes

Hi @farook2

Welcome to the community forum,

cheers :smiley:

Happy learning :smiley:

1 Like

Hi Karthik,
Thanks for your response but I m getting values but the thing is im unable to write that resulted values in same excel sheet,

Yeah, Thank you.

Hi,
I did those steps then also it is not writing my resulted data into same excel sheet, can you please create one xaml file if it is possible???

Thanks in advance.

In the properties of Excel Application Scope -

Check “AutoSave”
Uncheck “Create New File”
Uncheck “Read-Only”

  • AutoSave - Automatically saves the workbook on each change caused by an activity. If disabled, the changes will not be saved when the execution of the Excel Application Scope ends. By default, this checkbox is selected.
  • Create New File - When selected, if the workbook cannot be found at the specified path, a new Excel workbook is created with the name specified in the WorkbookPath property field. When cleared, if the workbook cannot be found at the specified path, an exception is thrown, informing the user. By default, this checkbox is selected.
  • Read-Only - Opens the specified workbook in Read-Only mode. Selecting this check box enables you to perform data extraction operations in an Excel file which is locked for editing or has an edit password. By default, this check box is not selected.

Regards,
Karthik Byggari

1 Like

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