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

I want to use Power Query to import data received from a client, where the file name changes each month. What's the easiest way to automate this?

Our take

Are you tired of manually importing client data each month, especially when the file name and location change? Power Query offers a streamlined solution that simplifies this process, allowing you to automate data imports with ease. By leveraging wildcard formatting and a dynamic file path, you can ensure that your spreadsheet always pulls the correct data. In this guide, we’ll explore how to set up Power Query to automatically retrieve your data, making the refresh process seamless and efficient.

I used to use VBA for this, but that's a lot more roundabout, and I have a lot less control over the transformation.

I have no issues with transforming the actual data itself. My issue lies in the fact that it's a different file each month. Using wildcard formatting, *filehere*.xls* would always pull the correct file. This file is also stored in the same place relative to my spreadsheet each time, but the location of the spreadsheet and folders itself changes each month.

In VBA, I could find the relative position quite easily via ThisWorkbook.Path & "\Data\"

However, I don't know how to use PQ to import automatically like this, so that I'd always import the correct data simply by refreshing links. I think I've seen people set up a somewhat hacky way, where PQ first reads a table in the workbook to retrieve values, and then uses those to find the file to query. Is that the only way?

submitted by /u/space_reserved
[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#real-time data collaboration#big data management in spreadsheets#conversational data analysis#intelligent data visualization#digital transformation in spreadsheet software#no-code spreadsheet solutions#modern spreadsheet innovations#machine learning in spreadsheet applications#enterprise-level spreadsheet solutions#collaborative spreadsheet tools#AI-driven spreadsheet solutions#cloud-based spreadsheet applications#automation in spreadsheet workflows#rows.com#natural language processing for spreadsheets#Excel compatibility#financial modeling with spreadsheets#Power Query