Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
Hi all,

I'm experiencing problems with Archive Utility in macOS Monterey 12.4.

Using that app, I can compress folders using any of the options it offers in preferences. I'd like to use 'Zip archive' most though, as I want the zipped folder to be opened by Windows users as well as Macs.

However, regardless of what format I choose to compress the folder to (Zip archive, compressed archive, regular archive, Apple Archive, or Apple Encrypted Archive), I then can't decompress (or unzip) the folder to make the folder contents available.

Instead I get this error message, every time.

Screenshot 2022-05-29 at 1.26.23 AM.png

At first I thought this was a problem created by the online platforms I was trying to store the file on (Google Drive, Dropbox, Wordpress, GitHub), but now that I can't even open them on my Mac immediately after creating them, it makes me think something else is going on.

I've also tried compressing the folder using YemuZip, which enables creation of zipped folders that don't contain the hidden resource fork files that display for, but are useless to, Windows users. Can't unzip those either.

I'm *not* interested in suggestions to install Unarchiver or some other utility, or to use Terminal. I know how to use those, and the zipped folders do open when I use Unarchiver. What I want is to created a zipped folder that people can unzip using the built in Archive Utility, or to find out whether this is a bug that is occurring to others.

In case it is relevant, the folder I'm compressing contains a .rtf Read Me file created using TextEdit, and a MS Excel 2021 .xltx template spreadsheet file.

Looking forward to the helpful advice I've received here in the past. Thanks.
 

DeltaMac

macrumors G5
Jul 30, 2003
13,710
4,552
Delaware
Can you open those .zip/compressed files on other Macs, or Windows? You did not say if you tried that.
 

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
No, I couldn't on other Macs (both a MacMini running Catalina and a 2018 MacBook Pro also running Monterey 12.4). However, a friend on a Windows machine could open it OK.

However, I think I may have found the root of the problem - the .xltx template spreadsheet file. When I tried compressing a folder with the ReadMe and a normal .xlsx spreadsheet, it would unzip perfectly well. This suggests that there's no macOS bug or Archive Utility bug, but a problem with Microsoft's .xltx file format, at least with Excel 2021.

I'm not skilled enough to work out what it might be, but it does at least suggest another route of enquiry.
 

DeltaMac

macrumors G5
Jul 30, 2003
13,710
4,552
Delaware
So, the fix/workaround is to save your Excel sheets as .xlsx
I think you can make that the file default in Excel prefs.

(Not the first time that MS has made things more challenging for Office users on Macs.)
 

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
OK, so in a further twist, I could decompress the folder, even with an xltx template file inside, but only if the folder name was all lowercase. When I included upper case characters in the folder name (prior to compressing it), I received the 'Unable to expand' error message.

Going to chalk this one up to a macOS / Archive Utility bug after all.
 

Sciuriware

macrumors 6502a
Jan 4, 2014
735
158
Gelderland
OK, so in a further twist, I could decompress the folder, even with an xltx template file inside, but only if the folder name was all lowercase. When I included upper case characters in the folder name (prior to compressing it), I received the 'Unable to expand' error message.

Going to chalk this one up to a macOS / Archive Utility bug after all.
I guess Finder could expand ZIP files by double clicking them.
;JOOP!
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,918
4,477
New Zealand
OK, so in a further twist, I could decompress the folder, even with an xltx template file inside, but only if the folder name was all lowercase. When I included upper case characters in the folder name (prior to compressing it), I received the 'Unable to expand' error message.

Going to chalk this one up to a macOS / Archive Utility bug after all.
That's bizarre.

In Terminal, try running "file" on it and see what it returns.

% file test.zip
test.zip: Zip archive data, at least v2.0 to extract, compression method=deflate
 

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
what are the user/access rights on the mentioned Excel template file?
They were created by the same user and have the same read/write permissions. As noted above, I no longer think the error is linked to the Excel file inside the folder.

So far as I can establish after multiple iterations and variations, it doesn't matter whether it is an .xlsx or .xltx file in the folder, the only thing that makes a difference is whether the name of the folder contains an upper case character part way through, when there are no gaps or underscores between the first word in the folder name and the second. So:

If the folder name is TrackingSpreadsheet and the zipped folder is TrackingSpreadsheet.zip it won't unzip.
If the folder name is trackingSpreadsheet and the zipped folder is trackingSpreadsheet.zip it won't unzip.
If the folder name is Trackingspreadsheet and the zipped folder is Trackingspreadsheet.zip it *will* unzip.
If the folder name is Tracking Spreadsheet [note the space between words] and the zipped folder is Tracking Spreadsheet.zip it *will* unzip.
If the folder name is trackingspreadsheet and the zipped folder is trackingspreadsheet.zip it *will* unzip.
If the folder name is Tracking_Spreadsheet and the zipped folder is Tracking_Spreadsheet.zip it *will* unzip.
 

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
But wait, there's more.

If the folder name is LookingGlass and the zipped folder is LookingGlass.zip, it *will* unzip. So it's not purely about a camel case folder name.

Further experimentation suggests that Archive Utility doesn't like it if the first word begins with an uppercase letter, is 8 characters long, and there's no space or underscore between the first word and the second word. But then the character length of the second word/string also has an effect, because TrackingGlass.zip will unzip.

Anyway, I give up. Basically my Mac doesn't like being asked to unzip a zipped folder called TrackingSpreadsheet. And I'll leave it there.

Thanks for your input.
 

rpmurray

macrumors 68020
Feb 21, 2017
2,148
4,325
Back End of Beyond
Since zip comes from the Windows world it might have something to do with the ancient Windows file naming scheme that uses the 8.3 format. So it may be unhappy if the 9th character is an uppercase letter, for some obscure reason.
 

arw

macrumors 65816
Aug 31, 2010
1,197
940
Anyway, I give up. Basically my Mac doesn't like being asked to unzip a zipped folder called TrackingSpreadsheet. And I'll leave it there.
Can totally replicate this even on Big Sur 11.6.5. No matter the content of the folder "TrackingSpreadsheet", after zipping, Archive Utility fails to unzip it. Same goes for "12345678Spreadsheet".

edit: normally I use BetterZip, but OP explicitly wanted it to work with onboard utilities
 
Last edited:
  • Like
Reactions: Chungkring

jdb8167

macrumors 601
Nov 17, 2008
4,823
4,546
They were created by the same user and have the same read/write permissions. As noted above, I no longer think the error is linked to the Excel file inside the folder.

So far as I can establish after multiple iterations and variations, it doesn't matter whether it is an .xlsx or .xltx file in the folder, the only thing that makes a difference is whether the name of the folder contains an upper case character part way through, when there are no gaps or underscores between the first word in the folder name and the second. So:

If the folder name is TrackingSpreadsheet and the zipped folder is TrackingSpreadsheet.zip it won't unzip.
If the folder name is trackingSpreadsheet and the zipped folder is trackingSpreadsheet.zip it won't unzip.
If the folder name is Trackingspreadsheet and the zipped folder is Trackingspreadsheet.zip it *will* unzip.
If the folder name is Tracking Spreadsheet [note the space between words] and the zipped folder is Tracking Spreadsheet.zip it *will* unzip.
If the folder name is trackingspreadsheet and the zipped folder is trackingspreadsheet.zip it *will* unzip.
If the folder name is Tracking_Spreadsheet and the zipped folder is Tracking_Spreadsheet.zip it *will* unzip.
Also: AaaaaaaaSpreodsheet will unzip but AaaaaaaaSpreadsheet won't. TrackingSpreadshete will unzip as well. So does TrackingSpreadshiit. If the first camel case word is capitalized and 8 characters and the second word is capitalized and spells Spreadsheet it won't unzip. Bizarre.

Edit: Any letter capitalized on the first 8 characters but only the S in spreadsheet. In other words trackinGSpreadsheet won't unzip but TrackingsPreadsheet will. Has all the hallmarks of a regular expression gone very wrong.
 
Last edited:

Nermal

Moderator
Staff member
Dec 7, 2002
20,918
4,477
New Zealand
I've just submitted it. It's an interesting one! The Unix "file" command erroneously detects it as an "sc spreadsheet file" and I suspect that Archive Utility is relying on that information.
 

Chungkring

macrumors newbie
Original poster
Jan 28, 2021
18
3
I've just submitted it. It's an interesting one! The Unix "file" command erroneously detects it as an "sc spreadsheet file" and I suspect that Archive Utility is relying on that information.
Thank you. I'm glad others checked to see if they could reproduce it, and I wasn't hallucinating!
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,918
4,477
New Zealand
Interestingly, under OS 10.14 it doesn't give an error... but it doesn't unzip it correctly either. It produces a .cpgz file, and attempting to decompress that gives you the original .zip again!
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,165
4,839
Hmmm... Double check the preferences in Archive Utility. "Keep Expanding" maybe needs to be off. Office documents are zip files, so AU might be trying to expand those and getting confused.
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,918
4,477
New Zealand
Hmmm... Double check the preferences in Archive Utility. "Keep Expanding" maybe needs to be off. Office documents are zip files, so AU might be trying to expand those and getting confused.
The issue happens with non-Excel files too, when they meet the naming pattern mentioned above.
 
  • Like
Reactions: NoBoMac
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.