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 / Fetch data from an exc...
Power Automate
Suggested Answer

Fetch data from an excel file and send mail with that data in email body in tabular format

(0) ShareShare
ReportReport
Posted on by 14
Hi all, I have the below requirement.
I need to create a parent flow in power automate that will read data from excel using “List rows present in a table” Lets say, that sheet has 10 columns (can be any number). This needs to use JSON to fetch the column headers and rows dynamically as I don’t know how many columns or rows will be there in the excel and i cannot hardcode them. Further these details needs to be send to a child flow as a parameter ( i guess, only “text” input parameter can achieve this) and then send those details fetched from the excel in an email in tabular form (using HTML, i guess)
i tried many options but getting some or the other errors like- object to array to string conversion. Copilot suggestions also don’t work.
I appreciate any of your help to achieve the solution. 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    Can you share the screenshot of the cloud flow ?
     
    That would be helpful so to find the reason behind the issue 
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

  • MD-19121507-0 Profile Picture
    14 on at
    I tried multiple options and achieved what was needed but need little help to customise the data representation in tabular form with borders and to remove 1st two columns as they are fetching from JSON data not excel data. Appreciate any help!

    My flow looks like this-

    image.png


    image.png
     

    Initialize v excel data in array
    Name- v_excel_data_in_array
    Type- Array
    Value- Empty

    Apply to each
    @{outputs('List_rows_present_in_a_table')?['body/value']}

    Compose-fetch current item
    @{items('Apply_to_each')}

    Append to array variable 
    @{outputs('Compose-_fetch_current_item')}

    Compose- Display final array
    @{variables('v_excel_data_in__array')}

    Compose- Change array to string
    @{string(outputs('Compose-Display_final_array'))}

    Parse JSON
    Content- @{outputs('Compose-Change_array_to_string')}
    Schema- 
    {
        "type": "array",
        "items": {
            "type": "object",
            "properties": {}
        }
    }

    Create HTML table
    From-
    @{body('Parse_JSON')}


    Send an email (V2)

    <p class="editor-paragraph">Below table will show you the details-</p><br><br><br>

    @{body('Create_HTML_table')}<table border="1" style="width:100%"></table>


    But email received as below image

    image.png
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    I think small change can be done in the flow while appending the details to array so that following first two properties can be removed
     
    In your flow make changes in expression used at this compose action highlight below
     
     
    removeProperty(removeProperty(items('Apply_to_each'),'@odata.etag'),'ItemIternalId')

    Also for sending email at the end - i would suggest following changes so that borders can be implemented in your html table in the email body

    replace(body('Create_HTML_table'),'<table>','<table border="1">')

     
     
    Hope this helps !
     
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

    ​​​​​​​
     
  • MD-19121507-0 Profile Picture
    14 on at
     
    Thanks for the solution, this really helped a lot! I appreciate!
     
    Just for the information purpose, wanted to let you know that while using removeProperty function it was giving me error that special characters cannot be handled so I first converted that into string, replaced the special character with ‘’ and then again changed back to JSON. 
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at
     
    Glad to know solution worked - kindly mark the appropriate answer as solution so that we can close the topic.
     

    Thanks & Regards,
    Nived N

    Stay connected:
    LinkedIn | YouTube | Blogs

    Was this answer helpful?
    If yes, please mark it as the solution by selecting the checkbox in the discussion thread.
    Your feedback motivates me to keep contributing. Thank you!

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 976

#2
Valantis Profile Picture

Valantis 863

#3
Haque Profile Picture

Haque 547

Last 30 days Overall leaderboard