web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Copying CSV data from ...
Power Automate
Unanswered

Copying CSV data from Sharepoint to Excel Table

(0) ShareShare
ReportReport
Posted on by 6
Hi! I'm hoping someone can help me with this, because I'm completely stuck...
 
I have a .csv file with a database export (about 150 columns / 14,000 rows) that gets uploaded to a folder in Sharepoint daily. I have an excel file with a table that is linked in a Power App as a data source. 
 
I am trying to automate removing all rows daily and replacing them with new data from the new .csv file but I can't get it to work. 
 
Also, the part of the flow that removes the the existing rows only gets 265 of them.
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,970 Super User 2025 Season 2 on at
    For your question about only 256 rows being processed, I can answer that. You need to enable paging under the settings of the list rows actions and set a limit for the number of items to return. The default is 256 as you have seen. 
     
    With the large number of rows you have every day, I would suggest writing an Office Script to delete the rows from the table and then running the Office Script on the file each day.  I am not positive this will work, as it was generated by Copilot. Make sure to replace "Sheet1" with the name of your worksheet and "Table1" with the name of your table. This script will delete all rows in the specified table, leaving only the header row intact.
     
    function main(workbook: ExcelScript.Workbook) {
      // Get the first worksheet
      let sheet = workbook.getWorksheet("Sheet1");
    
      // Get the table by name
      let table = sheet.getTable("Table1");
    
      // Get the number of rows in the table
      let rowCount = table.getRowCount();
    
      // Delete all rows except the header row
      if (rowCount > 0) {
        table.deleteRowsAt(0, rowCount);
      }
    }
     
  • Vadym Profile Picture
    2 on at
    Processing of 14000 rows in Apply to each loop requires too many API calls and time.
    The other approach is to use action 'Run office script' do delete rows (or delete the worksheet and create the new one, or create a new file).
    There is a video CSV to Excel Power Automate and Office Scripts Any File Encoding - Free | Fast | Easy https://www.youtube.com/watch?v=9J6ThPWGaG0&t=2s 
     
    When it comes to updating data with help of Office Script there is a limit in 5 000 000 cells by one action.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard