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 / Run Excel Script - LAR...
Power Automate
Answered

Run Excel Script - LARGE File

(0) ShareShare
ReportReport
Posted on by 288

How can I fix this issue I'm having with LARGE Excel Files?

It appears to be timming out every 2 minutes, which appears to not be long enough for it to convert to a table.

I keep getting this bad gateway...and the werid thing is this worked fine 6 months ago, but now it doesn't and two minutes appears to now not be long enough to complete the script???

 

 

Snag_7db14e.png

Categories:
I have the same question (0)
  • takolota1 Profile Picture
    4,978 Moderator on at

    What does the full script do?

    What is the rest of your flow? What are the inputs floring to the script?

  • Verified answer
    smithmrk Profile Picture
    288 on at

    It appears that I may have been trying to do too much in a script.  I cleaned it up and it seems to be working better now.

  • Thirupathi Profile Picture
    12 on at

    I am facing the same issue now, what should I do?

  • smithmrk Profile Picture
    288 on at

    What I ended up doing was breaking up the code or actions or validation or whatever you are doing into smaller scripts.  So instead of doing 3 things in one script, I ended up doing each of those 3 in 3 seperate scripts.  So that each script will have time to complete.  Trying to do too much stuff/code in one script will just make it timeout.

     

    Good Luck!

    Mark

  • Thirupathi Profile Picture
    12 on at

    Thanks for your response!
    Currently I am using the below script - Convert incoming CSV data into a range and add it to the workbook.(MS Page)
    Ref : https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/convert-csv

     

  • Thirupathi Profile Picture
    12 on at

    Could you please guide me on making separate scripts?
    It would be great If I get some reference.

  • Thirupathi Profile Picture
    12 on at

    Office script is running successfully with below 200 rows.
    But currently I have around 2000 rows in my CSV.
    I want to copy paste it into excel workbook.
    Here I am getting this bad gateway error.

  • smithmrk Profile Picture
    288 on at

    So my requirement was a bit different than yours.  Mine was already in Excel, it appears you need to convert it from CSV to Excel.  The link you provided appears to give you code to accomodate for the size.

     

    In my situation, I needed to convert the Excel File to a Table, then I was validating no empty cells, row headers match a template, etc.  I needed to split them up...so Script 1 ONLY does the Convert to Excel, then I have another script that validates the row headers, then I have another script that validates no empty fields.

     

    Like I mentioned before, trying to do all that in one script was causing it to timeout.

     

    Good luck,

    Mark

  • Thirupathi Profile Picture
    12 on at

    Understood.
    Thank you Mark!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard