04-04-2018 04:08 AM
04-04-2018 04:08 AM
Seems to have been a functionality change introduced in version 1803.
We have a protected workbook with some data connections to pull in data from SQL. Since updating to version 1803 the message 'Workbook is protected and cannot be changed' appears when trying to refresh the data. Removing workbook protection allows data to be refreshed.
Using the same workbook in version 1802 allows the data to be refreshed with the workbook protection left on.
Posting here in case anyone else experiences this issue.
04-07-2018 09:27 AM
Yes same issue with webquery. I have a ton of clients that have started reporting issues with workbooks that have been deployed to them. Is there a workaround, besides unprotecting the workbook?
04-09-2018 10:04 AM
I'm having the same problem. It started on or about April 4, 2018.
I have a .xlsm file which has a data connection to a .csv sheet located in the same folder. The workbook is protected and will not pull the data from the CSV. I'm getting the same error message as everyone else. Removing the protection from the workbook allows the data to be pulled. The last time the file itself was modified was back in January. Hopefully this is a bug and will be fixed soon.
04-11-2018 07:02 AM
Same here, already cost me a full day of work to create workarounds. The workbook protection is an essential feature. Extremely poor performance of Microsoft.
04-11-2018 07:32 AM
I have this same issue, the only work around I've come up with so far is to use a macro to run when the workbook is opened, unprotect the workbook, refresh the data (not in the background) and then lock the workbook. It's a pain in the arse since I have to change many different tools. Please roll this change back!
04-11-2018 07:39 AM
Can you share your macro? I don't think it'd work for my situation but it might help others in the same pickle.
04-11-2018 08:22 AM
Be aware, with a macro solution, that you may have to remove all checkboxes for 'refresh automatically when cell value changes ' for all queries in your workbook, and to refresh these queries with a command well from your macro. Similarly you will need to disable 'Refresh data when opening the file' and possibly also for background refresh. It is really a pain.
04-11-2018 08:49 AM - edited 04-11-2018 08:52 AM
Sure, happy to. I'm no Excel expert but put this together this afternoon. Use at your own risk.
Add this to the workbook macro section:
Private Sub Workbook_Open() Call RefreshQuery End Sub
Add this to a module:
Sub RefreshQuery() ThisWorkbook.Unprotect strAdminPassword Application.EnableEvents = False 'This value check looks at a formula I have in the workbook. if you haven't refreshed within a week you get a 1 If Range("SECTOR!B33") = 1 Then StartTime = Time ' Show 'Updating..'-message Not sure if the timer is needed any more, it was legacy from something else but it works with it, so hey if it ain't broke... ActiveSheet.Shapes.Range(Array("Rectangle: Rounded Corners 1")).Visible = True nSec = 0.1 + Timer While nSec > Timer DoEvents Wend 'Change "Connection" to the connection name you have. ActiveWorkbook.Connections("Connection").Refresh ' Remove 'Updating..'-message ActiveSheet.Shapes.Range(Array("Rounded Rectangle 1")).Visible = False nSec = 0.1 + Timer While nSec > Timer DoEvents Wend End If 'This section below is more specific to my use case - so I track when this was last refreshed, if it's older than a week I'll force the user to refresh to continue to use the workbook. Dim cell As Range Dim rng As Range Dim RangeName As String Dim CellName As String 'Single Cell Reference (Workbook Scope) RangeName = "REFRESH_DATE" CellName = "O1" Set cell = Worksheets("UCON Pricing Tool (2016)").Range(CellName) ThisWorkbook.Names.Add Name:=RangeName, RefersTo:=cell Range("REFRESH_DATE").Value = Date Range("REFRESH_DATE").NumberFormat = "dd/mm/yyyy" Application.EnableEvents = True ThisWorkbook.Unprotect strAdminPassword End Sub
You may need to edit the code to get what you want from it, but it's a base. I am still testing this with my workbooks so it may not be final. Effectively, use at your own risk/understanding. It may work for you, it may not. Currently, it seems to work for me but it's a pain in the arse of a workaround.
You'll need to disable background refresh for your connection, and disable refresh on opening.
04-13-2018 08:23 AM - edited 04-13-2018 08:50 AM
Yes this is a big problem.
My query is refreshed using VBA. I use a class object for the query so it can run in the background and trigger events. My workaround is to use the BeforeRefresh event to unlock the workbook, and the AfterRefresh event to lock it again. I have not tried to see if these events are triggered when a user selects Refresh All from the data ribbon.
Of course I do have to update all the workbooks that I have deployed!
04-13-2018 08:46 AM
Correct me if I am wrong, but shouldn't the last line in your RefreshQuery sub actually be:
04-13-2018 10:12 AM
04-13-2018 12:54 PM
I think if we want Microsoft to move and take some action to correct this, we need a lot more complaints in this thread than those of the few poor souls that are here now, who actually understand what is wrong. Suggest to mobilize your customers / colleagues to join in here.
04-13-2018 01:46 PM
04-16-2018 12:19 AM - edited 04-16-2018 12:19 AM
Thank you David very much for the macro, it works again!
I encountered the same problem, my excel needs to download exchange rates and needs to be protected. Since update I can no longer have the workbook protected and refresh connections.
When using macro to refresh connections, it is necessary to disable refresh of connection on the background and to disable refresh of connection when opening the workbook, otherwise macro locks the workbook before connection is updated / shows message, that the workbook is protected and cannot be changed.
Anyway I would appreciate solution from Microsoft and if possible - without necessity to use macros at all. The last update is a real pain in the arse.
04-16-2018 01:16 AM
Glad I could help! It's not a perfect solution but at least it gives us the ability to still use workbooks in the same way for the moment. I've reached out to Microsoft in a couple of other ways as well to see if we can find out something more.
04-19-2018 03:08 PM - edited 04-19-2018 03:12 PM
Here is some code that I adapted for other purposes a while back. I have added ThisWorkbook.Unprotect and ThisWorkbook.Protect to it to get around the bug. These are in events that are triggered before and after a refresh so you can have a background refresh and the workbook will only be protected again once the AfterRefresh event is triggered. Use it at your own risk, but it is serving me well.
In ThisWorkbook add the following declaration
Dim QueryAnswer As clsQueryDone
Then add the following to the Workbook_Open event. Make sure to change the sheet name and query number to the correct ones.
Private Sub Workbook_Open() 'Associate QueryAnswer with QueryTable 'Create query class object Set QueryAnswer = New clsQueryDone QueryAnswer.HookUpQueryTable Sheets("Sheet1").QueryTables(1)
Set up a Class Module called clsQueryDone and add the following to it:
Private WithEvents MyQueryTable As QueryTable
Private Sub MyQueryTable_AfterRefresh(ByVal Success As Boolean)
If Success Then
'Do whatever you want
MsgBox "There has been an error with the Query Refresh", _
vbOKOnly Or vbCritical, "Refresh Error"
Private Sub MyQueryTable_BeforeRefresh(Cancel As Boolean)
'and do whatever you want
Friend Sub HookUpQueryTable(qt As QueryTable)
Set MyQueryTable = qt
04-26-2018 12:36 AM
This is a major problem. Everybody vote this thread up and send complaint to Microsoft helpdesk.
Coded workbooks are usually used by a lot of people, and then suddenly production halts. Not fun.
A problem with the solution to open/close workbook:
If the code have to unprotect/protect for every data read, this takes time to run (since it decrypt/encrypt the workbook), making for a lesser user experience.
If this is intentional by Microsoft, at least there should be an option to toggle the new functionality of "protect workbook" on/off.
04-26-2018 12:49 AM
So I just checked the ticket I had logged on this with O365 support and it appears to have been closed without any response. Thanks Microsoft!
If anyone from MS Support is looking at this, the ticket number is #7854947, please reopen and provide a response. Thanks.
04-26-2018 01:09 AM
That's frustrating, I've reached out on Twitter again to the social team to see if they can chivvy something along, would suggest to do the same and raise more tickets about the same issue. They may not do anything unless there's enough noise.
04-30-2018 02:51 PM
This has created MAJOR issues for me. I have loads of protected models and reports that extract info via SQL that are business critical. Please microsoft, can you look at this this problem ASAP?
05-02-2018 02:16 AM
I'm trying to get a ticket raised on O365 support, but as I'm not the company administrator it's proving irritating.
05-02-2018 01:58 PM
I spoke to a microsoft representative for 2 hours, that was asigned via our administrator, no resolution at all...then just got pointed to another support group on the internet that i can not join...is getting rather frustrating!
05-03-2018 06:56 AM - edited 05-03-2018 07:02 AM
It is a known regression and we are working on a fix. Stay tuned and follow up the updates on Tech Community.
- Excel Team
05-03-2018 07:01 AM
Thank you Guy! :) Please keep us updated.
@Guy Hunkin wrote:
It is a known regression and we are working in a fix. Stay tuned and follow up the updates on Tech Community.
- Excel Team
05-10-2018 12:30 AM
@Guy Hunkin- many thanks for your update.
I did finally receive an update to the ticket I logged through O365, although the information directly contradicts what Guy has said in this thread!
This issue is by design and even Out of Support for Office 365 Technical Support.
You may share your valuable feedback for this on the below support links -
Should you have any additional queries, please let me know.
Microsoft Office 365
05-17-2018 05:55 AM
I have the exact same problem.
I hope a solution will be found soon.
05-22-2018 02:12 AM
Same problem here.
If it's a feature and not a bug (which I'm really hoping is not the case) then I'd like an option to not use it. I honestly can't see what benefit would there be to having it work like that.
05-22-2018 03:39 AM
Above, @Guy Hunkin suggested that it isn't a feature and the team is working on a fix. Guy - do you have any update?
05-28-2018 12:00 AM
The problem seems to be solved now. I don't get the pop-up anymore when I open the workbook.
Is it the same for you?
05-28-2018 11:18 PM
06-04-2018 08:26 AMSolution
The fix was deployed for the following Office versions:
Hope this helps.
- Excel Team
06-06-2018 07:40 AM
Thanks for the fix, however it now appears something else has changed to do with queries. In our documents we're using we have an Excel file connection that pulls some data in that is centrally updated, in versions up to the latest this seemed to work fine. Now it appears the latest version of Excel won't allow us to refresh that connection and asks for a Microsoft Access Database Engine OLE DB Initialization Information.
I tried replacing the query using the latest version of Excel, and it works fine, until you try opening the document with an older version of Excel and I get this error:
Any ideas for a fix? I seem to have one version that works on older versions (e.g. 2010) and one that works with the new version of Excel 365 v1805 build 9330.2087.
06-07-2018 04:47 AM
I am not sure I understand your scenario. Are you saying that you have a query that cannot be refreshed with an older Excel version anymore?
Can you please provide step-by-step instructions for us to repro the problem locally? I will also appreciate if you can share a problematic workbook with me? Just make sure to remove or scramble all the sensitive or private data before sharing your workbook.
07-24-2018 03:23 PM
Easy fix. Just protect sheet and workbook with new password of ur choice and then unprotect again...should be all sorted.
11-08-2018 05:07 AM - edited 11-08-2018 05:13 AM
I am still running into the same problem. I am running Excel version 1803, build 9126.2295 (see below).
I am running a basic query between two Excel workbooks on the same network. When the sheet I want to update is protected (default protection settings), I receive the below error.
Edit: to clarify that I receive the error message when selecting "Refresh All", in case that wasn't clear.
11-13-2018 03:51 AM
@Michael Stephenson, I am checking this. In a meantime please un-protect the sheet as a workaround.
11-25-2018 03:46 AM
Can you please upgrade your Office version? This should be resolved in the latest semi-annual Office build version 1808 (build 10730.xxxxx).
- Excel Team
11-26-2018 05:54 AM
No, unfortunately my Office updates are managed by the system admin and I cannot update Office until they schedule updates for the entire group. I do not know when these will be scheduled.
11-26-2018 07:38 AM
@Michael Stephenson, I'd like to suggest that you speak with your IT on this topic then. Re-install should probably solve the issue for you.
- Excel Team
06-27-2019 01:31 PM
@Guy Hunkin I am seeing this behavior on Excel 1808. 10730.20348 Click-to-run
Is there a hot fix or other patch required?
06-30-2019 09:30 AM
@MrJoeM, can you please share a screenshot of your Excel version? Go to File > Account > take a screenshot of everything that appears under Product Information on the right (remove your email address for the sake of privacy) an paste it in your reply to me.
07-09-2019 08:24 PM
I encounter this same problem and I have Version 1906 (Build 11727.20244). Initially I wanted to extract data from 2 protected workbooks from Onedrive, they worked just fine when unprotected but when protected I got a message that data was corrupted. I thought a workaround would be keeping a copy offline of both workbooks and use power query locally but with no success, I got the same error message.
Can you help me too?
07-14-2019 07:16 AM
Hi @MrJoeM ,
I am unable to reproduce the problem locally. Can you share the problematic workbook with me please and a video recording of the scenario? Make sure there is no sensitive or private data in your workbook though.
- Excel Team
07-14-2019 07:21 AM
Hi @rodrocdl ,
From your description I suspect it may be a different issue. Can you please:
- Excel Team
07-15-2019 11:24 AM
Hi @Guy Hunkin
Thank you for your help. Here is what you asked me to provide to you:
1. Version 1906 (Build 11727.20244 Click-to-Run), Also I attached a screenshot my Product Information section.
2. I have protected workbooks in a folder, I need to load their data into my Data Model. I use a main Excel workbook where I want to run Power Query to load all that data into one place.
So the steps are as follow:
- I click on Data Ribbon > Get & Transform Data > Get Data > From File > From Workbook.
- Then a window appears "Import Data" and I search for the folder where protected workbooks are.
- I select a single workbook and click the button "Import".
- Then I get this error message "File contains corrupted data". (Attached a screenshot of error window)
Loading data into Power Query works just fine when the workbook is unprotected but I can't make it work when protected.
I appreciate your help.
07-17-2019 01:48 AM
@rodrocdl , define "protected workbook" please. How do you protect it?
07-17-2019 08:47 AM
@Guy Hunkin, Protected workbooks as "Encrypt with password"
File tab > Info > Protect Workbook > Encrypt with password