VBA & Macro Problems

How to Automatically Create and Save a Daily Excel Overview Report

Steve KSteve K Nov 4, 2026 870 views

Question details

The user needs a method to automatically filter a PivotTable to show yesterday's data, save the results into a daily overview workbook, and overwrite the existing file every day for an automated email workflow.

How to Automatically Create and Save a Daily Excel Overview
Product
Microsoft Excel / Power Automate
Device & OS
not provided
Scenario
Automating the daily generation of a filtered PivotTable report from form responses and exporting it to an automatically overwritten overview file.
Observed behavior
The user currently relies on manual slicers and PivotTables but wants to eliminate manual intervention so the daily report generation, filtering, saving, and overwriting process runs automatically in the background.
Before you start

Ensure that the Developer tab is enabled in your spreadsheet software to access VBA tools, and confirm you have permission to automate file creation in your target directory or cloud storage.

Solution 1Recommended

Use a VBA Macro to Automate Filtering and Saving

Create a custom VBA script to automatically refresh your PivotTable, filter the data to yesterday's date, and overwrite the daily overview file seamlessly.

VBA (Visual Basic for Applications) allows you to automate repetitive tasks natively within your spreadsheet workbook. By tying the script to a Workbook_Open event or triggering it via a scheduled task, you can generate reports without manual clicks.

1
Access the VBA Editor

Open your primary Excel workbook, click the Developer tab on the ribbon, and select 'Visual Basic' to launch the editor.

2
Insert a New Module

Right-click on your VBAProject in the project explorer pane, select 'Insert', and choose 'Module' to create a blank script workspace.

3
Write the Automation Script

Input the VBA code to refresh your PivotTable caches, apply a filter for 'Date - 1' to capture yesterday's data, and use the 'ActiveWorkbook.SaveCopyAs' or 'SaveAs' method pointing to your Daily Overview file path.

4
Disable Overwrite Prompts

To ensure the file saves automatically without asking for permission to overwrite, add 'Application.DisplayAlerts = False' at the beginning of your script and set it back to 'True' at the end.

5
Save as Macro-Enabled File

Go to File > Save As, and choose 'Excel Macro-Enabled Workbook (*.xlsm)' from the format dropdown so your automation code is preserved.

Use a VBA Macro to Automate Filtering and Saving
Running Macros Automatically: To run this completely unattended without opening the file manually, you can use Windows Task Scheduler to open a VBScript that launches Excel and runs the specific macro.
Automate Workflows in WPS Spreadsheet

Create and Automate Daily Reports in WPS Office

WPS Spreadsheet features robust built-in support for VBA macros, making it an excellent lightweight solution for automating repetitive tasks. You can seamlessly run scripts to filter data, update PivotTables, and save daily overview files without heavy system resource usage.

  1. 1. Enable Developer Tools: Launch WPS Spreadsheet, navigate to the Options menu, and ensure the Developer tools are enabled to access the Macros ribbon.
  2. 2. Open the VBA Editor: Click on the Developer tab and select 'Visual Basic Editor' to begin scripting your daily automated report.
  3. 3. Write and Save the Macro: Input your macro to automatically filter your tables to yesterday's date and save the workbook copy. Save your file in the .xlsm format.
  4. 4. Execute and Automate: Run your macro manually via the 'Macros' button, or assign it to a shortcut button for one-click daily report generation.
Full compatibility with Microsoft Excel VBA macros and .xlsm filesAdvanced PivotTable tools for fast and accurate data summarizationLightweight architecture ensures fast script execution on large datasetsFree built-in Developer tools for macro recording and editing
microsoft office alternative - wps office

Frequently Asked Questions

Can I run an automated macro without opening the file myself?

Yes, you can use Windows Task Scheduler to trigger a VBScript or a command-line script that opens the spreadsheet program in the background, executes your specific macro, and closes the application.

How do I stop the 'A file named Daily Overview already exists' prompt?

In your VBA script, insert the line 'Application.DisplayAlerts = False' right before your SaveAs command. This tells the application to automatically accept the default choice (overwrite) without showing the prompt to the user.

Does Power Automate require a premium license to run Office Scripts?

Running an Office Script via the 'Run script' action in Power Automate is included with most standard Microsoft 365 business licenses, but triggering complex external connectors or custom APIs may require a premium license.