2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

How to batch process and refresh multiple excel files in parallel?

Our take

Are you looking to optimize the process of refreshing multiple Excel files? Automating the refresh of 116 files sequentially can be time-consuming, taking up to two hours. However, by mimicking your efficient manual method, where you batch process files and trigger refreshes concurrently, you can significantly reduce this time. In this discussion, we’ll explore how to create a Python or PowerShell script that allows you to refresh these files in parallel, streamlining your workflow and enhancing productivity.

Hi all,

I'm looking for an efficient way to automate the refreshing of 116 Excel files located in a single directory.

  • Each of the 116 files runs a data query to an ERP that takes 40-60 seconds to complete.
  • My current scripts (in Python, PowerShell, and VBA) process the files sequentially. This means the total time is roughly 116 files * 1 minute/file ≈ 2 hours, which is too slow.

My manual process is much faster (20-40 minutes total) because I process files in batches:

  1. I open a batch of about 14 files at once.
  2. I trigger "Refresh All" on each of them. Since the queries run in the background, by the time I've triggered the last file, the first ones are nearly done.
  3. I then go through the batch, saving and closing each file.
  4. I repeat this for the next batch until all 116 files are done.

How can I create a script (ideally in Python or PowerShell) that mimics this parallel, batch-based approach? I need a solution that can manage multiple files concurrently to be faster than my manual method, instead of processing them one by one. The script must wait for all data queries to finish refreshing before it saves and closes the files in a batch.

submitted by /u/Specific-Channel-287
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles

Tagged with

#Excel alternatives for data analysis#generative AI for data analysis#natural language processing for spreadsheets#real-time data collaboration#Excel compatibility#Excel alternatives#big data management in spreadsheets#conversational data analysis#intelligent data visualization#real-time collaboration#data visualization tools#enterprise data management#big data performance#data analysis tools#data cleaning solutions#rows.com#large dataset processing#cloud-based spreadsheet applications#natural language processing#Excel