Excel Power Query Refresh While Co-Authoring - Can't Merge Changes - excel

I have a Power Query which summarizes some data on user specific sheets into a master sheet from several user specific sheets that are edited using coauthoring via one drive. The source of the query being refreshed is the workbook itself and it is refreshed by hitting the refresh button in the UI. It works fine if users are not currently editing cells but if one of the users is mid-edit in a cell and the refresh runs on the query the user is presented with a message that their changes cannot be merged and that they must discard or save a copy when they try to leave the cell. Is it possible to prevent this from happening?

I brought this issue up to MS support and was told this is likely a bug in need of a hotfix. Excel Online does not support PQ, so when PQ refreshes and co-authoring is happening, it triggers the error. Hoping an update rolls out in the near future for this because it seems like such a huge oversight.

Related

How do I refresh an Excel Power Query using Power Automate Online?

I have data being pulled from a SharePoint list to an Excel file and I'm trying to use Power Automate online to create a scheduled flow that will trigger the "Refresh All" button for Power Query in Excel (see image). Due to different protections, I'm unable to simply schedule the refresh directly in Power Query in Excel and Power Automate cannot pull the SharePoint list in the format I need. There doesn't seem to be an option in Power Automate online that would connect to Power Query in Excel. Any suggestions?
Power Query Button
Power Automate doesn't have a feature to allow you to refresh connections or open/close a document. I was also encountering the issue of the document not refreshing on "open" because it was locked by another user (due to using One Drive). I couldn't use Power BI, scripts, or MACROS either.
I needed my workflow to add rows to a spreadsheet, update the pivot tables, and then send an email with the results. Here is what I did to get around the pivot tables not updating.
In Excel:
Open the pivot table options and select "Refresh data on file open".
Refresh Data
On the worksheet with your pivot table(s), create a table in a cell that has similar information as below (in the workflow we will update this table so it forces the system to re-open the document and refresh). Once the table is created, select the column and "Hide columns".
Updated Column
If you are using One Drive or a shared document like I did, when you have made all the changes you need, you will want to change the session to "viewing", and then close the document. 
*Any time you make changes manually in the document, make sure to "close" the session by changing it to "viewing" or else the workflow will not complete properly due to the doc being locked.
Viewing
In Power Automate: I have my trigger set to a schedule at the end of the month but your trigger or schedule and parameters can be whatever you set them as. I'm going to show you the steps that are important to the spreadsheet.
*Workflow snapshot:
Workflow Snapshot
Add a row into a table > Select the file location and the table > Update all the fields from the SharePoint list (Value= outputs('Get_items')?['body/value'].
I used this step to update the spreadsheet automatically with items added to a SharePoint list (so it can be extracted into a report monthly).
Add A Row
Delay 1: 10 minutes. This allows One Drive time to close and end the current session.
Update a row: Select the location of the file (this is the table we created and hid earlier).
Update Row
Delay 2: 2 Minutes
Get file content (One Drive) > Select the file. I was limited to only being able to see my individual One Drive so make sure your excel workbook is saved in a location you can select in Power Automate.
Convert file (One Drive)> Select the file. 
Convert File
Send an email > Attachment Name: (File Name= outputs('Convert_file') > Attachment Content: (Body= outputs('Convert_file'). It may be listed as "File content" in the Converted File section.
Send Email
There may be a simpler option if there is a way to refresh power query from Power Automate, or if you could use Power BI which is connected to Power Automate.
But there is also dataflows in Power Automate that can work similar to power query.
https://youtu.be/8IvHxRnwJ7Q
Then you can do any additional transformations in Power Automate & use Excel batch actions to import all the data to Excel from a flow.
https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Create-Update-and-Upsert/td-p/1624706

Refresh an Excel Report that comes from PBI

I have a page on PowerBI that I did not develop, but I can download data straight to excel. This data needs to be filtered on PBI first before anything, as it contains sensitive information that I will be eventually sending to an external partner. What I want to be able to do is download this report to excel one time and create pivot tables, with all of the necessary filters added, and be able to just click refresh on the excel file and have it update (PBI file currently updates daily). My end goal is to send this information to a vendor and all I will need to do is hit refresh so that I may send to them. I am lost on how to do this, so if anybody can help I will greatly appreciate it!
Analyze in Excel is exactly the way to go. Find more information here: https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-analyze-in-excel
You'll get a live connection to your Power BI dataset and you can use pivot tables to filter the data to your needs. And for sure the data is updated when you hit the refresh button.
To play it save you could finally remove the data connection from the workbook so that the data is frozen and there is no access to sensitive information.
See also my answer here regarding common Analyze in Excel pitfalls:
Power BI Exporting data to a excel/csv

How to ensure that data connected to external source has been refreshed

I have created an excel file which acts as a daily reporting tool and accesses data from an Access database. I have selected the option of refreshing data when workbook opens for all connections. However, today in the morning, when I opened the workbook, only a part of the data got refreshed. I suspect that it might be due to the fact that I was using wireless internet. A second attempt at refreshing the data was successful so there is nothing wrong with the data sources
So my question: is it possible to receive some sort of a confirmation when all the data has been refreshed? I thought about making a query in Access which returns today's date and then connecting this query to a cell in Excel. However, this does not solve the problem because this query result might get updated but the others might not

Excel 2010 Macro to do the same task again and again

I need to send Sales Report to my colleagues on the end of every week and I pull the same details from SAP (Stockwarehouse Russia). My question is, everytime I need to do the same steps again and again in Excel i.e. editing and deleting the same columns, applying filters, assigning the right description for the exact same fields, Movement Type etc. And it becomes very monotonous and pathetically time consuming.
So is there a way where I can record the steps I performed and store is somewhere on the HDD so that next time I can simply open Excel, run the program and report would be generated automatically?
What you will need to do is record a Macro
http://office.microsoft.com/en-gb/excel-help/create-or-delete-a-macro-HP010342374.aspx
http://www.dummies.com/how-to/content/how-to-record-a-macro-to-automate-tasks-in-excel-2.html
First 2 links in a Google search...
If you are using Excel 2013. I would higly recommend to use Microsoft Power Query AddIn (PQ). With PQ you can easily connect to SAP, than create some transformation with your data and save this as a "script". WHenever you open this worksheet you will have a fresh data. The adventage is that you don't need to use any piece of code and you can save your operation in few minutes.
Later if you will want to automate this operation you can write simple script (avaliable on the net) to refresh the worksheet and just add the code to send somewhere or if you have a SharePoint you can easily share with your worksheet with Power Query script into the SharePoint and everybody should have acces to your transormed data.
Please check: http://www.microsoft.com/en-us/powerBI/SAP.aspx#fbid=OjGdeZslbeu

How to link ms excel 2003 to ms access 2003

I have office 2003, and i have develop a database from ms access 2003.
What i want is to link ms excel and ms access so as when am updating either of them both will be updated
I know that from within Access, you can add a "linked table" with an Excel worksheet as a data source. This will cause the data in the Excel sheet to show up as a table in Access. When you make changes to the data in Access, the data in the underlying Excel sheet will change. Also, if you open up the Excel sheet and change the values in one of the rows, the change will be reflected when the link in Access is refreshed.
However, there can be issues when trying to link Access and Excel together. You may not be able to edit the same document from Access and Excel at the same time. Also, if you add additional columns or rows to your source data in Excel, you may have to completely re-link the table in Access.
If you are the only user of both the Access application and Excel sheet, you can develop a fairly robust solution using this method. However, you have to be careful with trying to deploy a solution like this with multiple users because you may start to get issues with multiple people trying to edit the same document at one time. At this point, you may need to look at more robust solutions involving a database or SharePoint backend.
As Ben said in his answer it is possible but can easily lead to problems in a multi user environment. I would suggest keeping the data in access and pulling it from excel. Or revisiting if excel is needed at all to update the date (read only reports would be ok)

Resources