Place Power Query Result in a Separate Worbook?

snaplink22

Board Regular
Joined
Jul 6, 2018
Messages
129
Hello,

I am pulling 6 tabs worth of data into one table using Excel Power Query, however, I would like to Close & Load the combined data to a separate workbook and not the one where the data is currently stored at. Is this possible?

Thank you.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
open new 2nd workbook, do: (data - new query - from file - from workbook) get data from the 1st workbook where is your source
then load data into the sheet in the 2nd workbook
 
Last edited:
Upvote 0
Thank you Sandy, however, I ran into another question while messing around with the Power Query.

When I am pulling data from 2 or more separate workbooks into one tab on a blank workbook all the headers appear below each subsequent table and I am unable to delete them. All my workbooks have the same column headers, but how do I go about just pulling over the data after the first query pulls over the header into row A?
 
Upvote 0
if your source data has the same structure and the same headers just Append them and you will get single table
 
Upvote 0
Still learning how to combine multiple workbooks with different names and those workbooks have different tabs and varying tab names as well. I've created a function to pull the first of me three files from my designated file folder, but when I attempt to invoke the function with the second file, labelled "WA_Cons" it cannot locate it for obvious reasons (see below function).

let
Source = (WA) => let
Source = Excel.Workbook(File.Contents("C:\Users\Benjamin Thiel\Desktop\New folder\" &WA), null, true),
SS_Sheet = Source{[Item="SS",Kind="Sheet"]}[Data],
#"Promoted Headers" = Table.PromoteHeaders(SS_Sheet, [PromoteAllScalars=true])
in
#"Promoted Headers"
in
Source

I've tried playing around with a few options, but I cannot ascertain what the code should be to include the WA_Cons.xlsx or WA_Lin.xlsx files when I invoke the function. The first file is named WA_SS.

Any thoughts?
 
Upvote 0
I saw what you mentioned before and redid my power query to pull from the file instead of the file. Here is my new function:

let
Source = (WA) => let
Source = Folder.Files("C:\Users\Benjamin Thiel\Desktop\New folder\" & WA),
Data_Sheet = Source{[Item="???",Kind="Sheet"]}[WA],
#"Removed Other Columns" = Table.SelectColumns(Source,{"Name"})
in
#"Removed Other Columns"
in
Source

However, I'm still not sure what to include in this code in order to be able to invoke the function to pull data from any of the 3 files I have.
 
Upvote 0

Forum statistics

Threads
1,223,794
Messages
6,174,643
Members
452,575
Latest member
Fstick546

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top