Forum

Retrieve multiple q...
 
Notifications
Clear all

Retrieve multiple queries in another file

6 Posts
2 Users
0 Reactions
73 Views
 Thyf
(@thyf)
Posts: 3
Active Member
Topic starter
 

I have 30 xl files in one folder. Each xl file contains 1 query cold Sales. As the format of the Sales source varies queries are different, however the outputs of these queries are the same.

I would like to append all data resulting of the queries in an other query in an other files.

How can I call a query which is in another file ?

if I write Excel.Workbook(), I can see the tab but not queries...

(I could retrieve the queries in each file and then append... but it will be really heavy and I think we might find another solution...)

 
Posted : 04/03/2019 10:57 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Thyf,

Have you loaded each query output to a worksheet in these 30 Excel files? If so, you can use Get Files > From Folder to get them in a new workbook and consolidate them into one table before loading to the worksheet or data model.

Mynda

 
Posted : 04/03/2019 6:56 pm
 Thyf
(@thyf)
Posts: 3
Active Member
Topic starter
 

Hi Mynday

thanks a lot for your answer.

No, I did not because my file would become super heavy. I appreciate that it could be one solution but I was hopping it exists a formula which will disclose queries in a file.

thanks

Thierry 

 
Posted : 06/03/2019 4:38 am
(@mynda)
Posts: 4761
Member Admin
 

Your file won't become 'heavy' because the 30 Excel files will contain one query and one query output into a table in the worksheet. You then get all of the data from each of the 30 files in a new Excel file in a single query and load it to one worksheet or preferably, the data model. It will be a very light file this way.

Mynda

 
Posted : 07/03/2019 8:05 am
 Thyf
(@thyf)
Posts: 3
Active Member
Topic starter
 

OK

not that simple because, I have 3 queries in each file for 3 different purposes... but I will do this

thanks for your help

 
Posted : 07/03/2019 9:29 am
(@mynda)
Posts: 4761
Member Admin
 

Oh, ok. Originally you said "I have 30 xl files in one folder. Each xl file contains 1 query cold Sales."

 
Posted : 07/03/2019 7:34 pm
Share: