Home

Querying information from multiple excel files into a single sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-309114%22%20slang%3D%22en-US%22%3EQuerying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309114%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Everyone%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20pull%20certain%20relevant%20data%20from%20multiple%20excel%20files%20that%20are%20located%20in%20multiple%20places%20into%20a%20single%20sheet%20on%20a%20new%20excel%20file.%20The%20files%20are%20not%20located%20in%20the%20same%20place%20because%20they%20are%20in%20their%20respective%20job%20folder.%20The%20data%20that%20I%20am%20trying%20to%20pull%20in%20should%20update%20automatically%20when%20updated%20in%20the%20original%20file.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20anyone%20has%20any%20advise%20I%20would%20appreciate%20it.%20If%20I%20was%20unclear%20or%20anyone%20has%20questions%20feel%20free%20to%20ask.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-309114%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309155%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309155%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20is%20the%20same%20when%20importing%20a%20single%20file.%20You%20only%20you%20have%20to%20do%20it%20multiple%20times.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309123%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309123%22%20slang%3D%22en-US%22%3E%3CP%3EI%20did%20find%20the%20Power%20Query%20option%20on%20the%20internet%20when%20I%20was%20searching.%20I%20wasn't%20really%20sure%20how%20to%20do%20this%20when%20the%20files%20are%20all%20in%20different%20folders%20on%20the%20server.%20The%20examples%20I%20saw%20had%20all%20the%20excel%20files%20in%20a%20single%20folder.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-309118%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-309118%22%20slang%3D%22en-US%22%3E%3CP%3ERebecca%2C%20that%20would%20be%20a%20job%20for%20Power%20Query.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.google.de%2Fsearch%3Fnewwindow%3D1%26amp%3Brlz%3D1C1GGGE_deDE566DE566%26amp%3Bei%3DRrEvXKfkJ8nHwQKil4zgCw%26amp%3Bq%3Dcombine%2Bmultiple%2Bexcel%2Bfiles%2Bpower%2Bquery%26amp%3Boq%3Dmerge%2Bmultiple%2Bexcel%2Bfiles%2Bwith%2Bpower%2B%26amp%3Bgs_l%3Dpsy-ab.3.0.0i22i30l4.5251.10930..11940...4.0..0.195.1765.8j8......0....1..gws-wiz.......0i71j0i203j0i19j0i22i30i19.Aj4w3aj_Mk8%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGoogle%20Search%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-863668%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-863668%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1639%22%20target%3D%22_blank%22%3E%40Detlef%20Lewin%3C%2FA%3E%26nbsp%3Bcurious%20where%2Fhow%20in%20Power%20Query%20you%20can%20specify%20more%20than%20the%20first%20worksheet%3F%20I%20have%20Power%20Query%20working%20on%2040%20files%20in%20a%20single%20folder%2C%20but%20I%20want%20to%20include%20information%20from%20multiple%20worksheets%20in%20EACH%20file.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-863686%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-863686%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F374906%22%20target%3D%22_blank%22%3E%40whiskeydude%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20use%20From%20Folder%20connector%20you%20specify%20first%20file%20(or%20any%20other%20one%20on%20your%20choice)%20as%20the%20sample.%20Based%20on%20it%20connector%20takes%20information%20from%20all%20files%20in%20the%20folder%20and%20combine%20it%20together.%20All%20these%20files%20shall%20have%20the%20same%20structure.%20More%20exactly%2C%20portion%20of%20information%20you%20combine.%20If%20you%20selected%20Table1%20or%20Sheet1%20for%20the%20sample%20file%2C%20from%20all%20other%20files%20it%20will%20be%20taken%20only%26nbsp%3BTable1%20or%20Sheet1.%20Within%20these%20objects%20small%20deviation%20in%20structure%20is%20possible%2C%20but%20it%20depends.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-886428%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-886428%22%20slang%3D%22en-US%22%3E%3CP%3Ethanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B-%20got%20the%201st%20part%20working%20(pulling%2030%2B%20files%20into%20a%20single%20sheet%20in%20one%20file.%20NOW%2C%20it%20gets%20tricker.%20I%20have%20a%20second%20sheet%20(same%20structure%20as%20the%20first)%20in%20just%20some%20of%20the%2030%20files.%20I%20figuyred%20out%20how%20to%20get%20all%20this%20data%20pulled%20into%20the%20same%20file%2C%20but%20Excel%20puts%20all%20this%20info%20in%20a%20second%20sheet%2C%20not%20the%20primary.%20I'm%20guessing%20I'm%20just%20missing%20a%20setting%20somewhere.%20Any%20clues%20on%20how%20to%20%22merge%22%20two%20sheets%20in%2030%20files%20into%20a%20single%20sheet%20in%20one%20file%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-887308%22%20slang%3D%22en-US%22%3ERe%3A%20Querying%20information%20from%20multiple%20excel%20files%20into%20a%20single%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-887308%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F374906%22%20target%3D%22_blank%22%3E%40whiskeydude%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20Query1%20collects%20data%20from%20Sheet1%20of%20all%20files%2C%20and%20Query2%20-%20from%20Sheet2%2C%20load%20these%20queries%20as%20connections%20only.%20After%20that%20in%20Power%20Query%20editor%20append%20one%20query%20to%20another%20and%20load%20result%20into%20Excel%20sheet.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAssuming%20all%20sheets%20have%20the%20same%20structure.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Rebecca965
New Contributor

Hi Everyone,

 

I am trying to pull certain relevant data from multiple excel files that are located in multiple places into a single sheet on a new excel file. The files are not located in the same place because they are in their respective job folder. The data that I am trying to pull in should update automatically when updated in the original file. 

 

If anyone has any advise I would appreciate it. If I was unclear or anyone has questions feel free to ask.

 

Thank you! 

7 Replies

Rebecca, that would be a job for Power Query.

 

Google Search

 

I did find the Power Query option on the internet when I was searching. I wasn't really sure how to do this when the files are all in different folders on the server. The examples I saw had all the excel files in a single folder. 

It is the same when importing a single file. You only you have to do it multiple times.

 

@Detlef Lewin curious where/how in Power Query you can specify more than the first worksheet? I have Power Query working on 40 files in a single folder, but I want to include information from multiple worksheets in EACH file.

 

@whiskeydude 

If you use From Folder connector you specify first file (or any other one on your choice) as the sample. Based on it connector takes information from all files in the folder and combine it together. All these files shall have the same structure. More exactly, portion of information you combine. If you selected Table1 or Sheet1 for the sample file, from all other files it will be taken only Table1 or Sheet1. Within these objects small deviation in structure is possible, but it depends.

thanks @Sergei Baklan - got the 1st part working (pulling 30+ files into a single sheet in one file. NOW, it gets tricker. I have a second sheet (same structure as the first) in just some of the 30 files. I figuyred out how to get all this data pulled into the same file, but Excel puts all this info in a second sheet, not the primary. I'm guessing I'm just missing a setting somewhere. Any clues on how to "merge" two sheets in 30 files into a single sheet in one file?

@whiskeydude 

If Query1 collects data from Sheet1 of all files, and Query2 - from Sheet2, load these queries as connections only. After that in Power Query editor append one query to another and load result into Excel sheet.

 

Assuming all sheets have the same structure.

Related Conversations
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
PacketMon Components are not loading in WAC 1909
HotCakeX in Windows Admin Center on
2 Replies