Extract data from webpage to Excel - uipath

I tried to automate this portal, but since I have a trouble due to new to UiPath.
This is a URL
Have to extract CompanyName,BrokerName,Address,Phone into Excel for a number of records as per user input.

Since that client data is in one element and separated by breaks (br) I would suggest to still use the Scrape Data feature, (pick the first and second data set-group) and pull in the data set as-is; so its in block format separated by new lines.
Then iterate through the results, do a split string array on the results, iterate through the string array and evaluate each line using regex. If an address match or email match or phone..etc.. Then handle it from there, You could dump the results into a temp data table and then dump the results into excel.
Granted there might need to be some fluff on your regexpressions and it might miss a few, but it would be a good start.
Hope that helps get you started

Related

Copying Data in Excel and replacing in Word Document using UIPATH

I would like to copy data from excel and replace text in word document.
However the cell references that contain data are NOT fixed as it depends on the number of debtors and the number of table rows the user wants.
Any help would be appreciated!
You can try reading the excel data using Read Range Activity and then Lookup into that datatable for the exact values that you want to replace.
And you can use read the Word File and replace the required values in Word file from the Datatable.

Apache Nifi, can I collect an attribute from multiple flow files

I have a nifi flow that takes in .csv files and partitions each into multiple records with each csv column value added as an attribute.
At one point in the flow, I'd like to collect the value of one attribute from each record that passes though. There could be from 0 to n collected. Once I have the list, it'll be emailed out.
I'm trying to avoid me (or someone else) getting bombed with emails if there are 200+ bad records in a file. So if I could collect for a fixed period of time or until another attribute (filename) changes, that would be great.
I've tried merge content and record. I even tried replace text to replace the content w/ just the attribute value I want to save and merging those, and a slew of other things.
Is there a simple way to do this in nifi?
Have you tried UpdateAttribute with a new attribute of type array. When each flowfile passes the this processor you could continue to update the value of this attribute by appending a new value to the array, attribute.
However, as #daggett pointed out, it will be helpful if you can provide the input and expected output.

Uipath - How to extract A table from a pdf

Hi i have found some video and text on how to do this but they dont help with this task.
I know how to get one values but not extract a table.
I want this to get exported into a database if possible or a Excel. But i cant figure it out.
I have even tryed change the "Change reading opption"
I tryed to "data scraping" but the program just say
"This controler does not support data extraction"
And it can't be more of a table then this.
I have heard that it cant be because the structure of the PDF is bad.
Still isn't there more ways of doing this.
Unfortunately, there is no activity in UiPath to read tables directly from PDFs. (As of today.) That was the bad news. The good news is that you can get to the contents of the PDF. Either you get the data (as flat text) directly with UiPath.PDF.Activities.ReadPDFText or you have to use OCR.
#kwoxer provided a wonderful link for explanations on this topic.
I have already been able to extract data from tables contained in a PDF document. At that time, I was lucky: ReadPDFText extracted everything. The table elements were separated by tabs ("\t"). And the table header contained a word that did not appear elsewhere in the document.
Just as an idea, I proceeded like this:
Extract text from the PDF document with UiPath.PDF.Activities.ReadPDFText.
Create an array, where the elements are the lines in the document. (Split using Environment.NewLine and option StringSplitOptions.RemoveEmptyEntries)
Go through lines in a loop (ForEach) until the table header is found. (StartsWith or Contains etc.)
The next row belongs to the table as long as it contains a tab. (Otherwise the table is over.)
Split current row by tab and store it in an array: The elements of the array are the individual cells of the row.
I hope, this idea help.

Identify if objects are the same

I want to check certain objects against each other and identify if they are the same.
For example, I need to verify that the total cost in one page is the same as another page. I developed a script that works, however the total cost changes every day so I have to update the object properties in maintenance mode every day.
Is there a way that UFT automatically recognizes this object must change and update?
I request you to elaborate your question. For now, you can use .* if certain values of the object are changing. Alternatively, you can store the values in an excel sheet and you can change everyday depending on the requirement.
If this is not helpful let me know
It sounds like you actually want to compare the values shown in two different objects, and see if those values are the same. (I assume this because you say they are on two different pages)
Also, you mention maintenance mode, so I assume you are using checkpoints to store their expected values.
I would suggest: instead of storing the expected values in a checkpoint, you could read the value of the first object (getROproperty), store it in a variable (dataTable field, environment variable, etc), and then navigate to the other page, read the ROproperty from the other object, and then compare.
i.e.
if {browser,page,object...}.getROproperty({whateverPropertyYouNeed}) = environment({storedFirstValue}) then
reporter.reportevent micPass,"compare step","{details here}"
end if
*replace stuff inside {} with your code, I don't know what it is
If you need to actually store the total cost externally, you could use a DataTable field and export the sheets at the end. then import the same sheet at the beginning. That would save the data to an excel sheet on a drive.

Display data using FILTER formula not working

I have this Google Sheets.
In sheet named Archive I have imported some tweets. In Sheet1 I have the following formula:
=FILTER('Archive'!A2:A;MMULT(SEARCH(TRANSPOSE(" "&A2:A&" ");" "&'Archive'!A2:A&" ");SIGN(ROW('Archive'!A2:A))))
What I would like to do is to display specific tweets from sheet Archive, containing specific keywords listed on Sheet1. This formula should work, but not in this case when I am importing data. All I get is a #N/A.
Am I doing something wrong?
As discussed on the sheet chat window, use:
=FILTER('Archive'!A2:A;MMULT(SEARCH(TRANSPOSE(" "&A2:A&" ");" "&TRIM('Archive'!A2:A)&" ");SIGN(ROW(A2:A))))
In short, the second argument of MMULT needs to have as many rows as there are columns in the first argument. Here is a spreadsheet that tries to describe MMULT used in this sort of way.
The TRIM part is to mitigate against spurious space characters that may be in the raw data.

Resources