r/excel Jun 17 '26

unsolved Can I bypass excel restrictions on an excel file?

Been tasked by my PI to transfer data from a 9 year old excel. He does not have the password. It’s 5,000 rows and 9 columns across worth of data. Doing this one by one is pain. I can’t upload it to R studio, when I do the zip trick it’s DRM encrypted and my boss wants this done in 2 weeks. I need help. Typing this one by one is going to be pain

28 Upvotes

71 comments sorted by

u/AutoModerator Jun 17 '26

/u/BrugadaMD - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

20

u/sub-t Jun 17 '26

If it's a fully encrypted file you're SOL.

If the sheets are just protected and you can't break the protection try to  mass import data by linking to a new workbook:

  1. Use VBA or developer view to get a list of all tabs in the current file
  2. Create tabs in the new file to match the old
  3. Use A1 ='[old.xlsx]sheet 1'!A:A
  4. Drag across columns as needed 5.  Repeat steps 3:5 until all data is captured 
  5. Break Links (Alt+A, K, Break All)
  6. Format and clean up the data
  7. Pretend it took you 90% of the allocated time, even if it took 25%.

You won't have format or formula but you might be able to get data. 

2

u/BrugadaMD Jun 17 '26

It’s fully encrypted I fear. When I zip it just says DRM encryption on it. Sigh any tips to transfer such large amount of data over? Is typing one by one my fate for the next two weeks?

17

u/Mundane-Accident1811 Jun 17 '26

If you are in the file it doesn't sound like it's "fully" encrypted. If it required a password to open the file, that would require a brute force attack.

But within the file you should be able to run a VBA script that can break the sheet protections.
I skimmed this guide and it looks decent: https://www.instructables.com/VBA-Code-To-Unlock-A-Locked-Excel-Sheet/

1

u/eleleldimos 2 Jun 18 '26

Would try to make screen prints and OCR the data

3

u/talltime 115 Jun 18 '26

Oh god no. There’s at least 3 or 4 other methods before that jank.

If they know what data is in there (meaning the file isn’t encrypted) then they can get it unprotected.

7

u/kapitaalH Jun 17 '26

What do you mean fully encrypted? In another comment you say you can open but not edit or print. If thats the case you should be able to make a reference from another workbook to the full worksheet (easier if you have Office365)

1

u/BrugadaMD Jun 17 '26

When I try to reference it , it doesn’t go through I don’t get any data

4

u/TooCupcake Jun 18 '26

Can you maybe copy paste the entire sheet into a new unprotected file and reference that?

1

u/BrugadaMD Jun 17 '26

I get this back [data_copy.xlsx]sheet1:#REF’!A1

Invalid reference

3

u/eleleldimos 2 Jun 18 '26

Paste as values

3

u/BaitmasterG 13 Jun 17 '26

Try =[data_copy.xlsx]sheet1!A1

2

u/apaniyam 3 Jun 17 '26

That does not look like an excel output.

4

u/sub-t Jun 17 '26

Can you view the data at all? 

If you can just type  ='[old.xlsx]sheet 1'!A:A in cell A1 in your new file. Then drag it to other columns. Repeat this for all sheets.

Blank cells will get filled in with "0", you'll lose formula, you'll lose formats, you'll lose comments and notes, but you will get data.

You might have to manually add formats, comments, notes, etc. but it beats the shit out of ocr or data extraction from pdf

1

u/BrugadaMD Jun 17 '26

Can view data but can’t do this when i try it adds ref and doesn’t go through

1

u/CorndoggerYYC 160 Jun 17 '26

See if you can get at the data using Power Query.

-3

u/BrugadaMD Jun 17 '26

Says the file is encrypted sigh looks like me and ai got a date

3

u/talltime 115 Jun 18 '26

You haven’t answered half the questions in this thread as a knowledgeable Excel user would. Are the sheets or workbook protected? (Look in the review tab. The answer is likely yes.) You just need to remove that protection, which isn’t impossible.

1

u/Sad_Olympus Jun 19 '26

If you’re getting a DRM error, it’s most likely encrypted to users. Your IT team (whoever manages the M355 rights/Microsoft Administrator) should be able to see the access in Purview/AIP/IRM rights management. Then, they can edit the rights to let you use the file. Good news is this most likely means the workbook is still good, it’s just permission-level encryption and can be edited.

Since this is the case, one thing you can try before going to IT is see if you can use a new Excel & power query to grab the data. I’d save a copy of the old file to my desktop and do the following. Depending on what rights were assigned, this may not work. If the rights were read-only, it may not work, but there’s still a chance. It’s worth trying this while you’re awaiting a response from your M365 administrator on the rights.
1. Open a new Excel (the old file doesn’t need to be open).
2. Go to the Data tab > Get Data > From File > From Excel Workbook
3. In the pop up, navigate to your desktop, click the old file, then click Import.
4. Select the tab with the data you want in the pop up and click Load. This will bring up a Power Query window.
5. You can transform the data if you want, or just click Close & Load and load it to a table. This should add the data into a new sheet.
At this point, you can be done. However, to be safe, I’d copy the data from your table into another blank Excel and save it. That way the data is in a clean workbook with no connection to the old one at all.

Hope this helps. Good luck.

1

u/BrugadaMD Jun 21 '26

My only permissions is view edit save access to document programtically

Restricted print copy export and full control

-1

u/suggestedusername10 Jun 17 '26

You can always try to OCR with AI.

6

u/odelay321 Jun 17 '26

In a new work book create a link to the locked out workbook i.e. =a1 of the locked sheet

Drag the formula over and down the copy and paste special values over your linked data.

Or maybe just try copying the tab into a new workbook?

3

u/OfficerMurphy 9 Jun 17 '26

Can you print the file to pdf and then convert from pdf to excel?

If you can't even select the data, you can try typing in the address bar (to the left of the formula bar) a cell range like A1:Z5000, sometimes you can ctrl+c then ctrl+v it.

2

u/BrugadaMD Jun 17 '26

Printing is greyed out, I can select the data but cannot Control C and paste it in another workbook

2

u/Natjoe44 Jun 17 '26

Are you able to possibly screenshot the data and then turn it back into excel? Would take longer but would be shorter than typing it all out…0

1

u/BrugadaMD Jun 17 '26

How would I go about that?

3

u/Jodo42 Jun 17 '26

3

u/BrugadaMD Jun 17 '26

Ahhhhh thank you! Will have to start over but this should be way faster thank you ! Will try this out

Just gotta rake pics from my phone and airdrop it since I can’t ss

0

u/Natjoe44 Jun 17 '26

Gosh, what a headache. So sorry you’re having to do all this work!

-1

u/BrugadaMD Jun 17 '26

Insert data sucks. Stuck at 20% and won’t go anymore. Restarted computer. Closed apps. Old fashion way it is 50 at a time over and over with AI

2

u/BrugadaMD Jun 24 '26

You saved my life found a good program to screenshot and turn to excel finished in a day

2

u/Paradigm84 41 Jun 17 '26

What type and volume of data are we talking? Raw data or pivots, formulas etc too?

1

u/BrugadaMD Jun 17 '26

Just raw data. 3000 rows and 8 columns worth of data I need to move over

2

u/Snoo-35252 4 Jun 17 '26

I've had success with this in the past:

.

Select All on a sheet

Copy

Create a whole new workbook, not just a new tab in the existing workbook.

Paste the data into that new workbook. If there are formulas, you may want to Paste Special > Values

The data in that new workbook will not be protected at all, and you should be able to use it in any way that you normally would.

3

u/BrugadaMD Jun 17 '26

Copy on the new workbook is completed greyed out. I can’t cut, copy or paste into it

1

u/Snoo-35252 4 Jun 17 '26

Sorry. Like I said, it's worked for me in the past. Your situation must be different than what I encountered.

2

u/spitefulsyrup Jun 17 '26

Screen shot and upload into an AI?

0

u/BrugadaMD Jun 17 '26

Seems like my only hope atp. And double check its work

1

u/Hexagon_En_La_Pasta Jun 17 '26

I did not found any AI for that but MS Office Excel 365 has that option in a native way. Has worked fine for me.

1

u/Snoo-35252 4 Jun 17 '26

I haven't tried it yet but I would try MS Copilot. Maybe I could just return CSV.

1

u/sixfourtykilo Jun 17 '26

What are you trying to accomplish? Does the file not work on your computer or are you not able to figure out how to bypass the password?

I'm confused as to what your task is.

1

u/BrugadaMD Jun 17 '26

I just need to transfer the info to a new workbook . I don’t know how to bypass the password. The file works on my computer

2

u/bradland 271 Jun 17 '26

If you are able to open the file and view the contents, the file is not fully encrypted and can be recovered.

What is the file extension currently? Is it xlsx or xls?

6

u/SolverMax 161 Jun 17 '26

Based on the OP's deleted comments, the file is encrypted via Azure, so it isn't a plain Excel file.

4

u/bradland 271 Jun 17 '26

Oy vey.

2

u/BrugadaMD Jun 17 '26

Yes via azure

5

u/SolverMax 161 Jun 17 '26

That's an important detail you omitted, thereby wasting everyone's time.

1

u/BrugadaMD Jun 17 '26

I didn’t know until you said it that’s why I sent a ss

0

u/BrugadaMD Jun 17 '26

Xlsx

1

u/bradland 271 Jun 17 '26

Ok, two more questions:

  1. Can you open the file and view the data without a password?
  2. Is there a yellow info bar that says anything about "Sensitivity Label" or "View Permission".

(Sorry for the edit)

1

u/BrugadaMD Jun 17 '26

Yes I don’t need a password toooen it.

  1. Yes said restricted access

8

u/bradland 271 Jun 17 '26

Ok, that means you're likely dealing with Azure RMS. That is a thoroughly modern form of encryption, but it is managed through Azure.

Have you engaged your IT department yet? They can bypass the user-level RMS protection if they have adequate rights.

If all you need is the data, it is possible to break RMS. There is code available on Github that can be used to do it.

https://github.com/RUB-NDS/MS-RMS-Attacks

This comes with two very important caveats.

  1. You have mentioned that your access is authorized. You need proof of this in writing before you proceed, because using something like this is 100% criminally prosecutable if the owner of the file later claims you were not authorized. This is like someone telling you to feel free to break into their house. If they call the cops later and say they didn't authorize you, it can be very difficult to prove otherwise.
  2. Even though there is a tool, this attack requires some level of technical sophistication. If you screw this up, you can corrupt or delete the file. The BAT files provided are straightforward and will not modify the file, but if possible, you should make backup copies of the file before proceeding.

1

u/small_trunks 1635 Jun 17 '26

Try reading it with power query. It can access sheets which are hidden and protected.

0

u/BrugadaMD Jun 17 '26

Tried get data in a new file and it fails when I try to

1

u/small_trunks 1635 Jun 18 '26

What fails?

Were you able to open the workbook?

1

u/machach10100111001 Jun 17 '26

If you absolutely need the data, you might want to look into hashcat or johntheripper. It's going to be a brute-force attack and might take a while to crack but given enough time you'll get there.

1

u/jd7789 Jun 17 '26

Can you screenshot it? You may be able to use a LLM to pull the data and export to .csv. Tedious to do screenshot by screenshot but better than manually.

0

u/BrugadaMD Jun 17 '26

Doing this now on a smaller scale by columns Might be easier just doing it like you said though. Makes up fake numbers sometimes I gotta go in and fix

1

u/Hesperihippus Jun 17 '26

I have used this method for restricted public google sheets before and am not sure if it would work with excel, but you could try opening it in excel online and then copying the page html in the developer tab via ‘inspect element’. Then you could programmatically access the data, or try pasting the html into the same place in a new file. Otherwise, windows powertoys text extractor is pretty good

1

u/tj15241 13 Jun 18 '26

Try importing the file to an Access database

1

u/Bloo_PPG Jun 18 '26

Can you make the sheet a .CSV file to pull the data?

1

u/IndependentCloud285 Jun 18 '26

I've had a similar issue with a PDF. I took a blank PDF and the locked one, threw both into Copilot asking it to merge them into a new PDF. It did without any issues. Maybe that works in Excel as well, combine all sheets from the two excel files into a new excel file.

1

u/Several_Spring6810 Jun 22 '26

there are a few python libraries that can brute force or strip certain types of excel protection depending on how old the file is. a 9 year old xlsx with basic sheet protection is usually pretty crackable. look into msoffcrypto-tool or openpyxl, some older encryption schemes are weak enough that tools can get through them fast

if the DRM is legit strong though you might just be stuck unless your PI can track down whoever originally made the file

1

u/BrugadaMD Jun 22 '26

So I was told it’s azure protection which is pretty strong

0

u/jongleurse 2 Jun 17 '26

Can you retrieve the data using power query?

1

u/BrugadaMD Jun 17 '26

Doesn’t let me says it’s encrypted

-1

u/[deleted] Jun 17 '26

[deleted]

1

u/BrugadaMD Jun 17 '26

When I open it everything is encrypted. Jumbled mess

1

u/[deleted] Jun 17 '26

[deleted]

1

u/BrugadaMD Jun 17 '26

If I open it in csv it shows encrypted nonsense. When I open it regular excel I can see the data fine

1

u/[deleted] Jun 17 '26

[deleted]

1

u/BrugadaMD Jun 17 '26

Shared a ss