2

My goal is to link an Excel macro file from a web app. When clicked, it should be opened in the already installed Microsoft Office Excel app. Target devices are iPads and iPhones running iOS 11 and above.

What I have tried so far is to link the file using the schema: ms-excel:ofe|u|https://myserver.com/somedirectory/myfile.xlsm, so no passback protocol or document context defined. When I click the link the Excel app opens but then displays a message that it is not possible in this version of office to open a file from this server. Manual I have used: https://learn.microsoft.com/en-us/office/client-developer/integration/integrate-with-office-from-ios-applications

So I did a research and found that it might be one of the following reasons:

  • URL is not encoded: I therefore tried to encode only the part after the |u| marker and also the full string. Neither of them worked.
  • Only links to SharePoint and OneDrive are supported: Hosted an Excel file on my OneDrive account and tried the public share link. This worked, however, the file was not opened in the installed Excel app on the device but in the online Excel editor inside Safari browser.

My conclusion is that the URL was formatted properly but Excel really does NOT allow any files loaded from own servers / other servers than OneDrive or SharePoint.

Can anyone confirm this for sure? Or is there a way how I can open an Excel file from an own server using the installed Excel app on my iOS device? Maybe there is a solution to somehow load the external file to OneDrive and then open it in the app, like https://onedrive.com/loadFile?url=https://myserver.com/somedirectory/myfile.xlsm?

Thank you in advance!

flogy
  • 906
  • 4
  • 16
  • "the file was not opened in the installed Excel app on the device but in the online Excel editor inside Safari browser." - I found this as well, then I added the location of the excel sheet to my "places" own the "open" tab of the Excel app then it opened in Excel and not Safari. Not very intuitive... – Codezy Jan 03 '19 at 16:44

2 Answers2

0

The URL scheme linked in the document only works for files hosted in FileShare or OneDrive. No other cloud services or local files.

See https://stackoverflow.com/a/52223696/1049134.

Rivera
  • 10,792
  • 3
  • 58
  • 102
0

I got it to work using a webdav server, so I think that is the solution if you don't want to use a cloud service. Opening the file directly on the webserver will not work.

Henrik Hansen
  • 111
  • 2
  • 9