Launch an add-in systematically when opening a file - excel

I want to make an Excel Online file, then post its link or embed it in my website. Clicking on that will open the file in Excel Online. Moreover, I want certain Excel add-ins to be installed and even launched automatically.
Does anyone know if it is possible?
If it's impossible with Excel Online, is it possible for a normal .xlsx file (I will make it, and opening it in Windows systematically leads to install an add-in and even launch it)?

If you're looking to automatically open a task pane add-in when the Excel file is opened, check out this article in the documentation: https://dev.office.com/docs/add-ins/design/automatically-open-a-task-pane-with-a-document?product=excel. The Office OOXML EmbedAddin sample provides an example of implementing the autoopen functionality that's described in the article.

Along with Kim's answer to automatic opening of a task pane add-in, you can using OneDrive to handle opening a file in Excel Online using Microsoft Graph.
You're start by uploading you're .xlsx file to OneDrive using an Upload Session. Once you're file is on OneDrive, you can retrieve it's meta-data for the DriveItem. Included in this meta-data will be a webUrl property. This is a URL that, when navigated too, will open your file using Excel Online.

Related

Save Microsoft Document(s) Java script API for desktop add-ins

Web versions for MS Office word, excel, power point documents are saved automatically online(even document name is not saved). Is there any common Java script API available for add-in's to save desktop versions word, excel, power point documents with default file name(without save as)?
Yes, there is. For example, in Excel web add-ins you can use the save(saveBehavior) method where you could pass the save value which allows to save the workbook without prompting the user. If file is not saved, it will save it with default name in the default location.
You can file a new feature request at https://aka.ms/M365dev-suggestions for other Office applications (Excel and PowerPoint).

Office Scripts Open Excel file in Desktop

Dears,
In Excel webapp, there is a menu button to open the Excel file in desktop app.
Can this action be done in Office Scripts? Open Excel file in Desktop?
main(workbook: ExcelScript.Workbook) {}
I answered the question here already. But for people landing on this page here it is.
See Office URI Schemes
To open an Excel file you can do something like this:
ms-excel:ofe|u|https://locationofthefile.com/file.xls
Use ofe to open a file and edit or ofv to open a file and view.
There are more complex options as you can read in the docs. But this will probably do it for the most cases
Application
URI
Word
ms-word:
Power Point
ms-powerpoint:
Visio
ms-visio:
Access
ms-access:
Project
ms-project:
Publisher
ms-publisher:
SharePoint
ms-spd:
Infopath
ms-infopath:

Updating Excel document with macros

Using the Microsoft Graph API with Office 365, I've not been able to update a .xlsm file with macros, even if all I'm changing is a row of data.
If I open the file in the web version of Excel (Office 365) and make an editable copy and re-save
The same command for a .xlsx file is fine.
OneDrive identifies a change has happened as the modified date changes, and the desktop app re-syncs the files.
In the web version, you can create an editable version and then when you download that file to the desktop the macros still exist.
If it isn't possible to normally modify the file, is it possible to emulate this behavior?

Uploaded excel workbook to SharePoint auto updates when changes made to the original

I have uploaded an excel workbook we constantly update to SharePoint for coworkers to view remotely as it has information they need. Would I have to delete and replace the workbook every time we make a change or is there a way that the workbook in SharePoint can automatically update with changes we make to the original which is on a Y drive? Thank you for any assistance.
When using SharePoint I find that there's an option to view the files in a document library using Windows Explorer. When you do that you can get the path out of the address bar and use that to update the file instead of the 'Y' drive. Benefit being you could also turn on version history in SharePoint then whenever anyone uploads a new version you can go to the past versions through SharePoint.
If your users don't all have access to SharePoint you could drag and drop from the Y drive to the address from the 'View in Windows Explorer' link or even automate it by writing a DOS batch job using the COPY command to copy the file over. Then you can use windows task scheduler to run the .BAT file however often you want.
Hope that helps!

SharePoint document library: Fail to open xlsx in Excel 2003 (with compatibility pack)

My company is using WSS 3.0 to host a document library storing (mostly) Office 2007 format documents. Company PCs have either Office 2003 (with the 2007 compatibility pack) or Office 2007 installed.
We didn't have any problem getting docx to work, but xlsx documents don't open properly when we use the SharePoint document edit options. The file opens in excel, but displays unformatted mess (close to the notepad representation). The actual files are fine, downloading the xlsx file (using the send to -> download option) allows the file to be opened. It is only when we use SharePoints 'Edit in Microsoft Excel' that we get an issue.
I think that the issue is excel (2003) trying to open the xlsx file as if it were and xls file, and being unable to represent the zipped contents. Has anyone seen this issue before?
EDIT: I've noticed that when the document is opened with explorer, it actually opens through the Microsoft open XML coverter. Clearly, SharePoint isn't using it, is there a fix that works round this?
UPDATE: I have done a bit more research, as added in the comment below this issue replicates across all machines on our network which use office 2003 and XLSX files from SharePoint. I have confirmed that using excel to open xlsx files in explorer (without the converter) results in the same issue as when they are opened from SharePoint. I think i need a way to tell SharePoint/IE (whatever actually handles the office interaction, URLMON/HLink?) that the proper file assosciation for XLSX isn't excel.exe.
Are you able to test this on another computer? Might be related to a registry entry and/or other software causing it (because you did not had problems with word). The ideal test scenario would be a brand new OS Install with only Office 2003 and the compatibility pack.

Resources