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 / Error while extracting...
Power Automate
Answered

Error while extracting HTML table with missing column header

(0) ShareShare
ReportReport
Posted on by 43

I'm getting an error in a PAD flow that's using an "Extract data from web page" action to examine the contents of an HTML table that looks like this:

Field1

Field2

Field3

Field4

Field5

 

Field6

123456

abcde

dsf

adf

sdfaf

 

dfaf

369121

fghij

dsfad

afa

dsfadf

 

dafdsf

102030

klmno

sdfds

adfaf

dsfaf

 

dsfasdf

 

I'll paste the full error below, but my reading of it is that PAD doesn't like the fact the 1st and 7th columns have no column names. My problem is that I need to flow to identify a particular row in the table based on the "Field" values, and then place a checkmark in the corresponding checkbox.

Has anybody come across this? Are there any workarounds I can use to sidestep this problem?

Error text:

Correlation Id: e7bcfd46-f52a-4387-80fe-aa6fc2f011ba

 

Column names can't contain null or empty strings.

Parameter name: columnNames: Microsoft.Flow.RPA.Desktop.Modules.SDK.Extended.Exceptions.InternalActionException: Failed to extract data (web page error while extracting data). ---> System.ArgumentException: Column names can't contain null or empty strings.

Parameter name: columnNames

   at Microsoft.Flow.RPA.Desktop.UIAutomation.WebAutomation.Runtime.Actions.LocalWebAutomationRuntime.ValidateColumnNames(IReadOnlyList`1 columnNames)

   at Microsoft.Flow.RPA.Desktop.UIAutomation.WebAutomation.Runtime.Actions.LocalWebAutomationRuntime.ExtractEntireHtmlTableFromWebPage(WebBrowserInfo webBrowserInfo, WebExtractionSelector tableSelector, IEnumerable`1 columnNames, WebPagerParameters pagerParameters, WebActionRetryParameters retryParameters, Nullable`1 timeout)

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at Microsoft.Flow.RPA.Desktop.UIAutomation.WebAutomation.Runtime.WebAutomationRuntimeRouter.Invoke(MethodInfo targetMethod, Object[] args)

--- End of stack trace from previous location where exception was thrown ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at System.Reflection.DispatchProxyGenerator.Invoke(Object[] args)

   at generatedProxy_3.ExtractEntireHtmlTableFromWebPage(WebBrowserInfo , WebExtractionSelector , IEnumerable`1 , WebPagerParameters , WebActionRetryParameters , Nullable`1 )

--- End of remote exception stack trace ---

   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

   at Microsoft.Flow.RPA.Desktop.UIAutomation.Shared.Rpc.RpcDispatchProxy`1.GetRemoteResult

 

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Ipsifendus 

     

    Is it possible to share the website URL to check from our end and assist you in appropriate ways?

     


    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 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

  • Ipsifendus Profile Picture
    43 on at

    Not easily; it's a web-based application rather than a public facing website. The product is a LIMS system called LabVantage. Much of the page content appears to be dynamically generated by javascript. I'm attaching the results of using the browser's "View Source" function on the page in question.


  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    It seems like you're using the "Entire HTML table" approach for extracting the data.

     

    Capture each column you want individually and build the table, instead of extracting the entire HTML table with one click. Your columns will then get some default column names assigned. You can then either leave them as they are, or set your own custom names. But you will not be allowed to leave any of them blank. When they're not blank, it should work fine.

  • Deenuji_Loganathan_ Profile Picture
    6,250 Moderator on at

    @Ipsifendus 

    You can try above @Agnius approach and see if it works for you in case if not, you can consider below suggestions.

     

    The above provided source code not helping much here, but I can offer some suggestions to help you solve it.

     

    Since you're already retrieving table values from the columns named field1 to field6, you should have an understanding of the number of rows in your table. Try inspecting the checkboxes to determine their IDs. For instance, if the first checkbox's ID is "customcheck1" and the second one's is "customcheck2," you can make educated guesses about the IDs for the rest of the checkboxes.

     

    Next, introduce a counter starting from one. Iterate through your data table and perform checkbox selection within the loop. Capture the checkbox you want to select within the loop and, once captured, adjust the checkbox ID from being static to dynamic by incorporating the counter variable into the checkbox ID.

     

    Step1: Extract data from the webpage (Retrieve the entire HTML table).

    Deenuji_0-1711256056781.png

     

    Step2: Use browser inspection tools to identify the checkbox IDs.

      

    Deenuji_0-1711254385815.png

     

    Step3: Capture the checkboxes using the "set checkbox on webpage" action.

    Deenuji_1-1711256886166.png

    Step 4: Modify the checkbox ID from static to dynamic within the checkbox UI element.

    Deenuji_2-1711257058303.png

     

    Follow these steps to dynamically select checkboxes based on your data table. If you encounter difficulties with these actions, you can resort to "get details of web page" to retrieve the page source code and use regex functionality to extract the required element IDs.

     

    Full flow screenshot:

    Deenuji_3-1711257304338.png

     

    Code:

     

    WebAutomation.LaunchEdge.AttachToEdgeByTitle TabTitle: $'''Error while extracting HTML table with missing col... - Power Platform Community''' AttachTimeout: 5 BrowserInstance=> Browser
    # Method1: Using Data Extraction
    WebAutomation.ExtractData.ExtractHtmlTable BrowserInstance: Browser Control: $'''html > body > div:eq(1) > div:eq(3) > div > div > div > div:eq(0) > div:eq(2) > div:eq(0) > div > div:eq(2) > div > div > div > div > div:eq(0) > div:eq(1) > div > div:eq(1) > div > div > div:eq(2) > div > table''' ExtractionParameters: {[$'''Value #1''', $'''Value #2''', $'''Value #3''', $'''Value #4''', $'''Value #5''', $'''Value #6''', $'''Value #7''', $'''Value #8'''], [$'''''', $'''''', $'''''', $'''''', $'''''', $'''''', $'''''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
    SET TotalRows TO DataFromWebPage.RowsCount
    SET Counter TO 1
    LOOP FOREACH DataRow IN DataFromWebPage
     WebAutomation.SetCheckboxState.SetCheckboxState BrowserInstance: Browser Control: appmask['Web Page \'h ... 598#M38574\'']['Input checkbox \'autoSubscribeToThread\''] State: WebAutomation.CheckboxState.Checked WaitForPageToLoadTimeout: 60
     Variables.IncreaseVariable Value: Counter IncrementValue: 1
    END
    # Method2: Get source code of your web page and parse your data using regex
    WebAutomation.GetDetailsOfWebPage BrowserInstance: Browser DetailsType: WebAutomation.DetailsType.Source Details=> WebPageProperty

     

     


    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 🚀. If you'd like to appreciate me, please write a LinkedIn recommendation 🙏

  • Verified answer
    Ipsifendus Profile Picture
    43 on at

    Wanted to make a note of how this was fixed...I determined that although two columns in the table lacked names in the header row, PAD was assigning the first unnamed column a default name, but not for the second unnamed column in the 6th position. Upon re-extracting the table, I discovered I could type a column name in to the blank space, and that fixed the error.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard