Home > database >  How can I write back to source excel files when I get Excel data from data tab?
How can I write back to source excel files when I get Excel data from data tab?

Time:01-04

So, I want to create one Excel file each for every manager with only one single sheet and place it on OneDrive.

In order to get the data in one place, I am creating another excel file called combined.xlsx.

Now, I can export each workbook to a tab using Data -> Get Data -> From File -> From Workbook .

This is great so far. So, I can read data of 10 excelfiles on 10 sheets in combined.xlsx.

Now, I want to modify contents of one of the tabs and make sure it is reflected to the original file. How can I do this?

CodePudding user response:

This is not possible unfortunately.

CodePudding user response:

To elaborate on why it is not possible, you need to understand how Power Query deals with data:

  • You load your data into Power Query via the "Data" tab. The source can be anything Microsoft allows.
  • You then manipulate the data any which way in Power Query.
  • As a last step, you decide if and where to load the results. If you only want to create a connection to the query, you select "Close and Load to", which appears after you click on the arrow next to "Close and Load", and you pick that. Otherwise, the only other options are loading the query results to a table, PivotTable report, PivotChart.
  • Because the output sheets you have are connected to the query that produced them, any time you refresh the query, whatever manual changes you have made in the table that the query created originally will be wiped out and overwritten with the refreshed data.
  • If you were able to write back to the source here, you'd in effect create a circular reference.

Check out this article about having Power Query output your data after manipulating it, maybe it helps.

  • Related