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 / Excel Online - Empty f...
Power Automate
Answered

Excel Online - Empty file when downloading right after creating table and rows

(0) ShareShare
ReportReport
Posted on by 143

Hi 🙋

I have a simple Power Automate flow that creates an .xlsx in SharePoint, creates a table (headers at A1:Y1), and then adds rows using “Add a row into a table”. At the end, I build a download.aspx URL and return it to Power Apps for the user to download.

The issue is that if I try to download immediately after adding the rows, the file comes down empty (only the headers or the just-created table). If I add a ~40-second Delay before returning the URL, the download is complete. I tried a different library/site and saw the same behavior.

Related observation: in the SharePoint library itself, if I open the newly created file right away, it also appears empty at first and takes a few seconds to “fill in” with data—though that delay is usually shorter than with the download.aspx download.

I built the flow following this DamoBird365 video: https://youtu.be/gr62sT2Ywd8?si=CMbs7rlRX984IHMf

My understanding is that Excel Online needs some time to “materialize” or consolidate the changes into the .xlsx after creating the table and writing multiple rows, and during that window download.aspx serves a version that hasn’t caught up yet. I’m looking for a supported way to ensure the workbook is truly ready for download without relying on a long fixed Delay. Is there any recommended pattern to confirm the file is consolidated or an official alternative that avoids this initial empty download?

I’m attaching a screenshot of the flow as well.

btn_financial.OnSelect:

ClearCollect(colDatos,
    ForAll(GaleriaFinancial_1.FinancialItems,
        {
            'Experience ID': Text(ThisRecord.FinaExpID.crdbb_experienceid),
            Experience: ThisRecord.FinaExpName,
            Status: ThisRecord.FinaExpStatus & "",    // Convierte la opción a texto
            City: ThisRecord.FinaExpCity,
            Building: ThisRecord.FinaExpOfficeName,
            WBS: ThisRecord.FinaExpWBS,
            Requestor: ThisRecord.FinaExpRequestor,
            'Start Date': Text(ThisRecord.FinaExpStartDate, "yyyy-mm-dd"),
            'End Date': Text(ThisRecord.FinaExpEndDate, "yyyy-mm-dd"),
            'Cost - AV': ThisRecord.FinaCostAV,
            'Cost - Cleaning': ThisRecord.FinaCleaningCost,
            'Cost - External': ThisRecord.FinaExternalProviderCost,
            'Cost - Catering': ThisRecord.FinaCateringCost,
            'Cost - Office Supplies': ThisRecord.FinaOfficeSuppliesCost,
            'Cost - Security': ThisRecord.FinaSecurityCost,
            'Cost - Maintenance': ThisRecord.FinaMaintenanceCost,
            'Cost - Other Request': ThisRecord.FinaOtherReqCost,
            'Cost - Space': ThisRecord.FinaSpaceCost,
            'OVT - Cleaning': ThisRecord.FinaCleaningOvertimeCost,
            'OVT - Waitress': ThisRecord.FinaWaitressesOvertimeCost,
            'OVT - CX': ThisRecord.FinaCXOvertimeCost,
            'OVT - Maintenance': ThisRecord.FinaMaintenanceOvertimeCost,
            'OVT - Space': ThisRecord.FinaSpaceOvertimeCost,
            'OVT - TS': ThisRecord.FinaTSOvertimeCost

        }
    )
);

UpdateContext({
  _ctxDownloadFinancial:
    'CX-FinancialExcel'.Run(JSON(colDatos)).excelcontenido
});
Download(_ctxDownloadFinancial);



 

Thanks!

 

Categories:
I have the same question (0)
  • developerAJ Profile Picture
    4,763 on at
    it's because of sync issues. it takes some time to sync the data.
     
    add concurrency for apply to each. Increase the delay or create a do while loop with delay timer check the data if data is available exit the loop if not run the delay.
    in this case i would recommend sending file in excel

     

    If this solution helped you resolve your issue, kindly mark it as accepted — it makes it easier for others to find and also closes the discussion. If you found it useful, a Like ❤️ would be greatly appreciated!

    🤝 Let’s connect on LinkedIn || 📘 Explore more on my articles

  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    With respect to @developerAJi its not a sync or concurrency issue, it is in fact a specific built in caching issue in SharePoint.
     
    You think 40 seconds would seem bad, in most cases the required time period is 10 minutes because the file isn't synced in the Library itself, the file itself is fine, but it has to be versioned bla bla and anything else related to what you may or may not configure in sharepoint (labels etc).
     
    I am surprised you got it that fast.
     
    You are potentially better off sending yourself an email after the required delay (which again can be up to 10 minutes), versus waiting on the Delay itself. Meaning, set a message to the user that they will receive an email :-) or a notification, in which case you can use a Timer in the app, and have it validate its done then grab it.
     
    Honestly its just a PITA using Excel for real-time data like this.
     
  • FlowFalcon Profile Picture
    143 on at
    Hi @Michael E. Gernaey thanks for your input. After reading your comment, I tried a different approach to avoid relying on a fixed delay: instead of waiting for X seconds, I watch the file’s metadata until SharePoint “settles” the .xlsx.

    Specifically, I take an initial snapshot right after creating the file using Get file metadata using path (I named the action “GetMeta Before”) and store two variables: SizeBefore (size) and TimeBefore (last modified).

    Then I run a Do until called “Corroborar XLSX” that fetches the metadata again and compares it to that snapshot. Once the size or last-modified time changes, I assume SharePoint has consolidated the workbook. If it hasn’t changed yet, I wait briefly and check again.

    With this pattern I’m seeing about ~40 seconds on average in my library, but the download is no longer empty, and I’m not tied to a big fixed delay. If there’s an “official” way to confirm the binary is ready without this loop, I’m happy to switch; for now, this has been working reliably.

    Rgrds

    GetMeta Before ==>> @outputs('Create_file')?['body/Path']

     

    Set variable - SizeBefore ==>> @{int(outputs('GetMeta_Before')?['body/Size'])}

    Set variable - TimeBefore ==>> @{outputs('GetMeta_Before')?['body/TimeLastModified']}

     


    Corroborar XLSX ==>> @and(greater(int(outputs('GetMeta_Loop')?['body/Size']), variables('SizeBefore')), not(equals(outputs('GetMeta_Loop')?['body/TimeLastModified'], variables('TimeBefore'))))

    GetMeta Loop ==>> @outputs('Create_file')?['body/Path']

    Tamaño Actual ==>> @{int(outputs('GetMeta_Loop')?['body/Size'])}

    TimeLastModified ==>> @{outputs('GetMeta_Loop')?['body/TimeLastModified']}


     
  • developerAJ Profile Picture
    4,763 on at
     

    I don’t think there’s a direct way to achieve this—you’ll need to use a loop with a delay timer. Also, keep in mind that Power Apps action responses time out if a response isn’t received within 2 minutes.

     

    From a user perspective, having to click something and wait 40 seconds or more isn’t ideal. If the client isn’t particular about the format, consider generating a CSV file instead of Excel—it’s much faster. Alternatively, you can send the file via email.

  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
     
    Love you man but all you did was say exactly what I said :-) which people keep doing and its a little frustrating.
     
    As for you @FlowFalcon
     
    No there is no issue with doing that, as long as you have a short time out. The reason I suggested using a timer, is because it provides an async pattern you can use so your user isn't blocked and can you can have a progress bar or something and then a button that shows up when the file is ready for download.
     
    Primarily about the user experience versus anything else.
     
    I love your solution :-) very nice.
     
    Cheers,

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
  • developerAJ Profile Picture
    4,763 on at
     
    I apologize if I did something wrong, but that’s actually the same solution I mentioned in my first comment on the query.

    In addition, I included a CSV-based approach to extend the solution. I want to clarify that I wasn’t trying to copy or reuse anyone else’s response — everything I shared was based on my understanding. 
  • Verified answer
    bssarita Profile Picture
    18 on at
    The problem is not in your logic, because its Excel Online, you cant predict when the action is completed. Delay will not work for certain amount of time as it depends Queue during the Flow call.
     
    If Table is needed quickly, then send the list of data in a email or display the Link to download the Excel in mail. By the time the email is triggered, the Excel activity of adding rows will be completed. 
     

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