Direct editing of Microsoft Office files on the server (Plone) - ms-office

Is the following behavior possible (using some features of Microsoft Office not very well known by a Linux guy)
Upload Microsoft Excel (or some other office file in Plone) as File content type
Save
When you click the file next time it opens directly in Microsoft Excel
When pressing Save in Excel it directly updates the file on the server, not the local temporary copy
I think Microsoft Office provides some APIs to do things like this but I have no idea how they work. Some Webdav URLs maybe?

Enabling external editing and using Zope External Editor Client (PYPI) should to do just that (for Archetype -based content types), but it must be installed on all client machines and may have issues. The development version should also support Dexterity-based content types.

Related

How do I distribute excel office add-in(w/ office.js) in privately?

Q1. Are there any method to distribute excel office add-in(w/ office.js) in privately?
(Will office.js add-in also be distributed like VSTO's .exe OR .xla/.xlam macro files with password?)
Q2. If I run office add-in server(node.js) on my on-premise server, What will have to be distributed to the end-users?
(I want to hide the core source logic unlike VBA macro.)
I am now developing an excel office add-in. But there seems to be some limitation to deploy to the end-users in my company.(We are now testing environment for pilot, and using office 365 but it is restricted by IT's policy)
When I refer to the official documentation below, the docs says that the way to deploy add-in in privately are Microsoft 365 admin center OR SharePoint catalog.(AppSource is publicly for everyone.)
refer. https://learn.microsoft.com/en-us/office/dev/add-ins/publish/publish
However, it seems that it have to use Microsoft's services or components like SharePoint or admin center. I don't want to use these items because I want to flexibly cope with various environments.
I have also read the article as below.
refer. How to distribute private office add-ins?
But the reply thread seems that the writer couldn't get the appropriate answer what I also want to know.
I want to know the other ways to distribute excel office add-in(w/ office.js) without unveiling my core source logic and what is the minimum materials I have to provide to the end-users(i.g. manifest or something).
Typically, as you have already know, you need to host the add-in's source code on the web server anywhere. The manifest file just refers to the place where the sources are stored. And the single file which should be provided to be able to side-load add-ins locally is the manifest file. Everything else is hosted under your control.
Due to the nature of the web technology you can't hide the source code from users. The add-in acts like a regular web page. The best what you could do is to obfuscate your code.

Can I create a browser extension that prevents download of specific file types and forwards user to a link?

I want to create an extension that prevents Office documents download and instead opens them in Office Online. Do browsers (preferably Chrome and Edge) have such API and what code do I need to write to implement my idea?
If we talk about Edge then we cannot stop the file from getting download.
If you have the direct link of file then you can directly open it using Office Online.
You can try to store your Office files on OneDrive. Then you can open it via Office Online.
There is an extension available which supports both Chrome and Edge for the same purpose.
If you store the file in OneDrive then it can open the documents in Office online.
But, It cannot stop the Office files from getting download.
Quick access to your Office files in the browser
I did not get any code example to develop the extension that can prevent the user from downloading the Office file and open it in Office Online.
For chrome (although Edge is supposed to support chrome APIs but I've not tested) please check a potential solution at https://browserextensionresources.blogspot.com/2018/09/intercepting-file-download-in-chrome.html

Embed Excel in a website to edit a locally stored document

Is it possible to embed google excel in my website to edit document stored locally?
My manager asked me if it is possible to integrate the Microsoft office webapp in my own website.
Clients have excel files stored on our website, we want to know if it is possible for them to open the file with a web excel page, edit the file and save the modifications. For now, they use SharePoint so it is easy for them but we intend to use an other platform.
Our client can have all the license we need.
I searched but I didn't find any solution.
I know you should be able to do this with ASP and the .Net Framework. SharePoint uses ASP pages, so you may try to do something simpler.
If you go over the Internet you'll see several solutions because people do this too.
e.g. a thing you can do is to use Open XML API to do this, and it is like reading / modifying a flat file on the server. A restriction is it has to be .xlsx / 2007 format onward.

Details of Microsoft Office Url protocol?

Microsoft Office Documents register custom url protocol on the client computer.
This is especially used by SharePoint. For example, if I open an excel file, I see the call to this url :
ms-excel:ofv|u|https://mycorp.sharepoint.com/Documents/somefile.xlsx
Is there any available documentation of this feature?
What are the format and options of these urls?
There is limited documentation available here. These protocol handlers appear to only support http and https URI.
To summarize, Microsoft office registers the following protocol handlers:
ms-word:
ms-powerpoint:
ms-excel:
ms-visio:
ms-access:
ms-project:
ms-publisher:
ms-spd:
ms-infopath:
To view a document:
ms-excel:ofv|u|http://contoso/Q4/budget.xls
To edit a document:
ms-powerpoint:ofe|u|http://www.fourthcoffee.com/AllHandsDeck.ppt
To Create a New Document from a template:
ms-word:nft|u|http://cohowinery/templates/elegance.pot|s|http://cohowinery/presentations
There is currently no protocol handler registered on Microsoft Windows to launch Power BI.
Support is available on mobile platforms (including Windows Mobile) via the mspbi protocol handler. The following is a summary of the official documentation which is available here.
Open the Power BI mobile app:
mspbi://app/
Open to a specific dashboard:
mspbi://app/OpenDashboard?DashboardObjectId=<36-character-dashboard-id>
Open to a specific tile in focus:
mspbi://app/OpenTile?DashboardObjectId=<36-character-dashboard-id>&TileObjectId=<36-character-tile-id>
Open to a specific report:
mspbi://app/OpenReport?ReportObjectId=<36-character-report-id>
Open a specific report page:
mspbi://app/OpenReport?ReportObjectId=<36-character-report-id>&reportPage=ReportSection<number>
Open in full-screen mode (for Windows Mobile devices only):
mspbi://app/OpenReport?ReportObjectId=500217de-50f0-4af1-b345-b81027224033&openFullScreen=true
Since i do not have the reputation to comment, here is a solution for local files, which seems to work for me (Microsoft 365 MSO (16.0.13530.20490) 64-bit):
"C:\Program Files\Microsoft Office\root\Office16\protocolhandler.exe" "ms-powerpoint:ofe|u|file:///C:/path/to/file with spaces.pptx"
Important to note are the forward slashes. Also if you use the wrong program, i.e. use ms-powerpoint for .xlsx files, this will fail. protocolhandler.exe is located in the Office root directory, which might be in another location on your system (it's the directory where WINWORD.EXE, POWERPNT.EXE etc. are located)
If you want to open local file, maybe try:
ms-excel:file:/Users/river/Desktop/2.xlsx
ms-word:file:/Users/river/Desktop/2.doc
...

Do Office Add-ins always require Internet access to work?

Let's take Excel for example. In Excel 2016, when I select an add-in in the STORE, after clicking on Trust It, will the code (.html, .js files) of the add-in be downloaded or installed on my machine?
In other words, have the add-ins under MY ADD-INS been already installed on my machine, such that i could load and run them without Internet (if an add-in does not send or receive special data to or from Internet)?
I am asking this question, because i want to know if a basic add-in always requires Internet access to work.
As Eric mentions, Office add-ins are indeed web based. However, to add a bit to his answer:
While you definitely need a one-time access to fetch the manifest and the original HTML/JS/CSS files, if your add-in is not using license checking (it's free) and does not require web services, you should be able to make a website that uses standard offlining techniques to load with no internet connection after the first time.
I tried it out real quick with pointing a manifest at http://html5demos.com/offlineapp. After loading it once and then disconnecting my internet, I was still able to load that page.
Hope this helps,
~ Michael
Yes, the new Office add-ins are web-based. They are all defined - and installed - by a manifest file which specifies the URL location of the web source files. These are always hosted on the provider's web server and are not cached for offline use. The licensing system used by most add-ins (the ones that aren't free) requires a connection to the provider's web server which in turns needs to verify the user's license against the Office Verification Licensing Service. If offline use was enabled users could use a trial license in perpetuity without the provider being aware.

Resources