Skip to main content

Notifications

Power Automate - General Discussion
Answered

Run Excel Script - LARGE File

(0) ShareShare
ReportReport
Posted on by 276

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

  • Thirupathi Profile Picture
    Thirupathi 12 on at
    Re: Run Excel Script - LARGE File

    Understood.
    Thank you Mark!

  • smithmrk Profile Picture
    smithmrk 276 on at
    Re: Run Excel Script - LARGE File

    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
    Thirupathi 12 on at
    Re: Run Excel Script - LARGE File

    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.

  • Thirupathi Profile Picture
    Thirupathi 12 on at
    Re: Run Excel Script - LARGE File

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

  • Thirupathi Profile Picture
    Thirupathi 12 on at
    Re: Run Excel Script - LARGE File

    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

     

  • smithmrk Profile Picture
    smithmrk 276 on at
    Re: Run Excel Script - LARGE File

    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
    Thirupathi 12 on at
    Re: Run Excel Script - LARGE File

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

  • Verified answer
    smithmrk Profile Picture
    smithmrk 276 on at
    Re: Run Excel Script - LARGE File

    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.

  • takolota1 Profile Picture
    takolota1 4,790 on at
    Re: Run Excel Script - LARGE File

    What does the full script do?

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

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard