web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Desktop Equivalent to ...
Power Automate
Answered

Desktop Equivalent to "List Rows Present in a table"

(0) ShareShare
ReportReport
Posted on by

I have a spreadsheet with 3 columns: ID, Name, and URL.

 

I have a flow that launches Edge, navigates to the URL and prints it to PDF.

 

So I need to grab the ID of a row, append it to a pre-defined URL, and name the file the value from the Name column, and I need it to do that for every row in my spreadsheet.

 

I could do this in my sleep in a cloud Flow but unsure of how to do it in the desktop app.

I have the same question (0)
  • sergiopereira83 Profile Picture
    25 on at

    I am considering that it is extracting all the text from Excel and that the columns are ordered with ID, Name and URL.
    Pending the conversion from jpg to pdf, you can evaluate. I also don't understand if any fields in Excel need to be updated.
    It looks something like this:

     

    sergiopereira83_0-1712180309143.png

     

    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''Test.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    LOOP FOREACH CurrentItem IN ExcelData
     WebAutomation.LaunchEdge.LaunchEdge Url: CurrentItem[2] WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 PiPUserDataFolderMode: WebAutomation.PiPUserDataFolderModeEnum.AutomaticProfile BrowserInstance=> Browser
     WebAutomation.TakeScreenshot.TakeScreenshotSaveToFile BrowserInstance: Browser File: CurrentItem[1] FileFormat: WebAutomation.FileFormat.Jpg
     WebAutomation.CloseWebBrowser BrowserInstance: Browser
    END
    Excel.CloseExcel.CloseAndSave Instance: ExcelInstance
  • Verified answer
    CU16071609-1 Profile Picture
    6,255 Moderator on at

    Hi @PatrickMcLeanGL,

    Please find the below requested workflow where you can read data from excel file and append into existing URL.

    Deenuji_0-1712210321466.png

    Code Explanation:

    1. Set the URL variable to 'https://www.hp.com/us-en/shop/vwa/printers'.
    2. Launch Excel and open an existing Excel file located at 'C:\Deenu\hp_Products.xlsx'.  Save the instance of Excel as 'ExcelInstance'.
    3. Read all cells from the Excel file using the Excel instance. The first line is considered as a header. Save the range value as 'ExcelData'.
    4. Launch Google Chrome and navigate to the URL stored in the URL variable. 
    5. For each item in the ExcelData:

    a. Navigate to a specific page on the HP website related to the current product using the 'ProductName' from the ExcelData.

    b. Develop the logic to save the webpage as a PDF document. (Implementation details are not provided in the given code.)

    6. Close the web browser instance.

    7. Close and save the Excel instance.

     

    Code:

    SET URL TO $'''https://www.hp.com/us-en/shop/vwa/printers'''
    Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Deenu\\hp_Products.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance
    Excel.ReadFromExcel.ReadAllCells Instance: ExcelInstance ReadAsText: False FirstLineIsHeader: True RangeValue=> ExcelData
    WebAutomation.LaunchChrome.LaunchChrome Url: URL WindowState: WebAutomation.BrowserWindowState.Maximized ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 PiPUserDataFolderMode: WebAutomation.PiPUserDataFolderModeEnum.AutomaticProfile BrowserInstance=> Browser
    LOOP FOREACH CurrentItem IN ExcelData
     WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: $'''%URL%/prnttyp=%CurrentItem['ProductName']%''' WaitForPageToLoadTimeout: 60
     # #Develop the logic to save your website as a PDF document
    END
    WebAutomation.CloseWebBrowser BrowserInstance: Browser
    Excel.CloseExcel.CloseAndSave Instance: ExcelInstance

     

    How to copy/paste the above code into your PAD?

    Deenuji_1-1712210640122.gif

     

    How to save your webpage as pdf - Print or Save Webpage to PDF - Power Platform Community (microsoft.com)

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Note that PAD also has a List rows present in a table action under the "Excel Online (Business)" action group, if your file is stored on SharePoint/OneDrive and is formatted as a table.

     

    Other than that, Launch Excel in combination with Read from Excel spreadsheet and Close Excel is essentially what you need to read the data. Follow the suggestion by @Deenuji , as he explains it quite well.

  • PatrickMcLeanGL Profile Picture
    on at

    Ok I followed the suggestion and it worked great, thanks.

     

    One other issue I am having though, is that I want to open those URLs in Edge and then print them. I think the only way to do the printing is using the Recorder and recording myself pressing print, which works for the first iteration of the loop, but on the second iteration it fails saying it cant find the button to press (because the button press refers to a specific browser instance) and I am closing the window at the end of the loop before reopening it at the start. 

     

    Is there some other way to tell edge to print in PAD, or is there a way to keep the same window instance open and navigate to a new URL without closing the window?

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @PatrickMcLeanGL 

     

    Could you please first confirm which suggestion you followed and found effective? Based on that code, we can provide further assistance.

     

    Thanks,

    Deenu

    -------------------------------------------------------------------------------------------------------------------------

    If that solution works for you, please mark it as the solution for your queries. Doing so will motivate the people who suggested that answer and encourage them to assist you further. Thank you.

     
  • PatrickMcLeanGL Profile Picture
    on at

    Actually I found my problem and it's working perfectly now, thank you.

     

    One last question, while this flow is running can I do other stuff on my pc or do I have to leave it alone? I have 1000+ records to go through in total so I may end up setting up PAD on a different computer to run this if that's the case.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If it's not interacting with any user interfaces, you can work on your machine. If it is interacting with a user interface, you may need to avoid interrupting it, or use the picture-in-picture mode. See here for reference: https://learn.microsoft.com/en-us/power-automate/desktop-flows/run-desktop-flows-pip

  • CU16071609-1 Profile Picture
    6,255 Moderator on at

    @PatrickMcLeanGL 

     

    I assume you are currently executing your flow manually by clicking run, ensuring that you don't disrupt your bot's activities by accessing for other tasks if your bots is interacting with any windows app or web application, as this could cause failures if their sequence is disturbed.

     

    This is known as attended automation, where the bot operates while you are signed in to your system. If you wish to run the automation in the background or even when your system is locked, there is another type of automation known as unattended automation.

     

    Difference between two types(Attended/Unattended):
    Please look at the below table and link

    Deenuji_0-1712239596528.png

     

    Link:  Attended and unattended scenarios for process automation - Power Automate | Microsoft Learn

     
    Attended Bot - Requires Power Automate Premium license - $15 (per user/month).

    In case if you want to run your bots in unattended mode you have to buy Power Automate Process
    $150 per bot/month.

     

    Read link for license - Power Automate Pricing & Subscription Plans | Microsoft Power Automate  

     

    Or as suggested by @Agnius you can also use PIP mode.


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

     

     
     
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard