SOLVED

Re: Design Studio - XLSM files (Excel w/ macros)

Go to solution
Jean-Pascal_Mer
Level 4

Design Studio - XLSM files (Excel w/ macros)

Hey guys,

We have a content repository for our Partners. All the documents are hosted in the Design Studio. We recently added an Excel file with macros (.xlsm).

When going to the repository page and clicking the download link, no problem, file downloads ans open.

But if we give direct link and customer copy it in his browser, he gets the attached screenshot.

Anyone has any idea why it would do that?

Cheers

JP

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Design Studio - XLSM files (Excel w/ macros)

It's being sent as Content-Type: text/plain. That's your problem. text/plain is expected to be openable in the browser, so the browser's doing the right thing with what it's got.

View solution in original post

12 REPLIES 12
Jim_Thao7
Level 9

Re: Design Studio - XLSM files (Excel w/ macros)

I'm not exactly sure about the root cause of this, but I do know that this happens when you target a new tab/window on a click link.  I usually just take away the target="_blank" and let the link open in the same tab for the download link to work properly. 

Jean-Pascal_Mer
Level 4

Re: Design Studio - XLSM files (Excel w/ macros)

Hi Jim,

In this case, it's not really opening a link through a button or a click, but pasting the URL (or clicking in an email) that opens up the URL. So the target="_blank" wouldn't be used.

It's really a weird behavior.

Jim_Thao7
Level 9

Re: Design Studio - XLSM files (Excel w/ macros)

Ahh, gotcha.  Try to build your link like this to force a download on click <a href="www.url.com" download="">click me</a> and see if that helps.

SanfordWhiteman
Level 10 - Community Moderator

Re: Design Studio - XLSM files (Excel w/ macros)

Your server likely isn't set up with the right MIME type for .xlsm.

If you tell me the actual URL I can tell you more.

Jim's suggestion is great but it only works in some browsers (the download attr is not universal).

Jean-Pascal_Mer
Level 4

Re: Design Studio - XLSM files (Excel w/ macros)

SanfordWhiteman
Level 10 - Community Moderator

Re: Design Studio - XLSM files (Excel w/ macros)

It's being sent as Content-Type: text/plain. That's your problem. text/plain is expected to be openable in the browser, so the browser's doing the right thing with what it's got.

Jean-Pascal_Mer
Level 4

Re: Design Studio - XLSM files (Excel w/ macros)

And would that be a server problem or a document problem? (I'm gonna investigate on my side to find that answer until then )

Jean-Pascal_Mer
Level 4

Re: Design Studio - XLSM files (Excel w/ macros)

Ok, it is the MIME Type. Thanks Sanford!

SanfordWhiteman
Level 10 - Community Moderator

Re: Design Studio - XLSM files (Excel w/ macros)

It's a server problem, or more precisely a missing line in the server config.