How to loop through a web table column and download multiple PDF files using Automation Anywhere? - automationanywhere

I have an HTML table that has seven columns and 3 rows (the number of rows may be more or less). The second columns contains a links to PDF files and the seventh column contains the phrase "Corrective Action" I only want to download the PDF files from the columns that contain the word "Corrective Action". However, my code is only downloading the first PDF.
Here is the code:
http://dev.atriumfinehomes.com/clonewebtable/sample.PNG
This is the table:
http://dev.atriumfinehomes.com/clonewebtable/table.htm
Could I get some help with this please?

Get the links of the PDF files using Extract Table command.
Steps to get the links:
- Edit the Extract Table command -> Advanced view -> Step 6: Extract Selected Tag details to CSV file. Tag Name: Hyperlink, Attribute Name: Get URL.
- Save the data to another CSV file. (You can't save it in the same file as it will append or overwrite).
- Open the file CSV file as a spreadsheet.
Inside the loop
- Create a new variable $vCounter$, because the links.csv file dosn't conation headers as the table.
- Using variable operation assign $Counter$-1 to $vCounter$.
- Using Get Cells command and get cell A$vCounter$ and assign it to a new variable $vPDFURL$.
- Use $vPDFURL$ as Download file URL in the download command.

It's because you only download the 'correctiveaction1.pdf' but the PDF from the line 3 is named 'correctiveaction3.pdf'

Related

Neo4j Database error General Unknown Error

Load csv with headers from "https://drive.google.com/open?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8" as row
with row
return row
this is my code I am trying to access the csv file with 1 million records from my drive using load csv
It is giving me following error:
Neo.DatabaseError.General.UnknownError: At https://drive.google.com/open?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8 # position 1750 - there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: 'docs-fwds":'
I am not getting the issue
can anyone help me solve this?
URL you entered is not the actual path of the file but the link to a page which opens the file from google drive. So the link you provided points to the HTML page and not the CSV file.
If you want actual URL to the file try to download it and copy the URL that appears in the new tab.
You can change your query as follows(updated with actual URL):
Load csv with headers from "https://drive.google.com/uc?id=1pyWY81bKzcCF7T-i_-MyhY2kJ4Z8NYP8" as row
with row
return row
Don't return a row if the file is large, the browser will become
unresponsive.

IFTTT - Download a list of files from a URL

I have a CSV with a list of file names in the first column
filename1
filename2 etc
The actual files are sitting on website.com/< filename >.pdf
How do I write an applet to download all the files from the URL into maybe Dropbox?
Thanks heaps
Its easy in Zapier
create a Zap that is triggered for new rows in a google sheet, and when triggered reads a cell in the row (which is the file url) and uploads it to dropbox.
Once you have set this up you paste your CSV into google sheets and voila!

Programmatically generated CSV file format issue for Excel and Numbers

In my iOS project, I have programmatically generated csv file from my data. Most of time, it looks all good for Microsoft Excel and Apple Numbers to open with.
But when the cell data is something like 5 - 60, it seems Excel would automatically convert it to date value like May-60, while Numbers open it correctly.
I have found this thread: https://stackoverflow.com/a/165052/833885, so the solution makes Excel happy is using "=""5 - 60""". But this will make Numbers shows ="5 - 60"......
You can quickly generate empty csv file to test what I described above.
Is is possible to generate csv file that makes all world happy???
Thanks in advance.
You can create a new file in excel and import from the data ribbon tab - this gives options to specify the data types for 'columns' in the csv. A bit of a pain but will avoid the issue.

Create object in Rails from text file

I am building a site with Ruby on Rails where I can display items that are for sale. Currently I can add new items by filling a form with title, price, some text and upload a couple of pictures.
Since there might be many items I would like to have a text file with the data, one item on each line, data separated with comma or whatever. Then I'd like to give this file to my Rail's application that will create the items in the application. Would this be possible?
What you're basically talking about is importing and exporting CSV files.
You can learn about the basic ruby functions available to you when working with CSV files here: http://ruby-doc.org/stdlib-2.3.0/libdoc/csv/rdoc/CSV.html
Here's a video about exporting to csv and here's a video about importing from csv.
You essentially will call :to_csv on some collection, and then use CSV's foreach or some method of iterating the items in the CSV, and you will create your rows from the parsed data.

How to send file from action to next action

I'm new in RoR.
I want to make that logic:
User upload xml or csv file from /home (static_pages#home) and send it to elms#el_select
If file is xml and file contain more than one element I want to show page to user so him choose which element he want to show
If file is csv or xml with one element I want to show result page
So here is two use-cases:
- choose file - view results
- choose file - choose element - view results
In second case I upload file in static_pages#home, send it to elms#el_select and I don't know how to send it from elms#el_select to result page.
In first case I don't know how to skip page rendering and send file to another controller
Controllers do not store files for up/download or any other data. They just manipulating with instances of their models (with their behaviour). So, if I have understand your question in the right way, the order may be next:
StatiPagesController take the file from user and store it somewhere (/tmp or smth.) if the file is valid;
ElmsController take the file from storage and render the proper view (or redirect_to proper view if such already exist).
Finally, I've found answer on my question:
#key = SecureRandom.uuid
Rails.cache.write(#key, #file)

Resources