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 / Specifying Table Range...
Power Automate
Answered

Specifying Table Range in the Create Table Action dynamically.

(0) ShareShare
ReportReport
Posted on by 379

I am in the process of creating a flow that needs to create a table on an excel sheet that we receive every month, but the issue is that the number of rows vary reach time, some months we might get like 250 rows listed in the sheet, other months there are 350 rows, etc... is there a way to count the number of rows that are present in an excel file and then based upon that number specify the table range in the Create Table Action?  I would to be able that this flow is fully automated and not having to go back to the flow each time and manually having to change the table range manually every month. Any guidance is most appreciated.

Categories:
I have the same question (0)
  • Verified answer
    DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Lorem1960 

     

     

    Are you specifically looking to add a table onto an existing excel file? You have the same number of columns, possibly with a header row, but don’t know the number of rows. Office Scripts. You can write something bespoke really easy. Detect the active rows on a sheet and from that range create a table. I’ve a video on something very similar here https://youtu.be/UspiIlj6hSQ

     

    Let me know how you get on.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

     

    Damien

     

  • JAWL Profile Picture
    393 on at

    Hi @DamoBird365 

     

    I found that my Excel neither has Office Script nor able to install it due to my organization policy. However, I do have the Developer - Record Macro but it could not synchronous to the Run Script step in Flow. Is there another way to get the total number of rows in a non-table worksheet?

    JAWL_0-1646293349830.png

     

  • generice Profile Picture
    21 on at

    I have this same issue, can't use Script, need to get the number of rows when there is no table.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 470

#2
Haque Profile Picture

Haque 416

#3
David_MA Profile Picture

David_MA 344 Super User 2026 Season 1

Last 30 days Overall leaderboard