Communication between a webpage and Excel? - excel

I am trying to find a way to make a web application communicate with Excel in the same way that a desktop application could talk to it using COM. The basic description of my problem is as follows:
User selects a cell within an Excel worksheet.
User switches focus to a web application running inside a browser and clicks a button.
The clicking of the button inside the web application causes a string to drop into the open Excel spreadsheet at the cell that was previously selected.
I should reiterate at this point that I am not trying to make a webpage generate an Excel file. Rather, I am trying to have the web application directly pass a message to the open instance of Excel.
This would be straightforward if I were writing a desktop application. But in the browser context, security is going to keep the web application from communicating with Excel. I understand that it might be possible to use an ActiveX control in IE to do this sort of thing, but I would prefer allow the application to run in any browser and ensure that the user does not have to modify their browser security settings.
Can anyone suggest a workaround? One thing I wondered about is whether you could use RTD to approach the problem. I have not used RTD, so I am unfamiliar with its exact capabilities. But if the user is logged into the web application, could their button click send a message to the server that is then relied back to the Excel instance using RTD? This assumes that the user also has an Excel plugin that provides their account credentials to the RTD server.
Thanks very much.

barrowc - The button is just there to communicate with Excel.

Related

Convert VBA user form into Android mobile application is there any way to achieve this?

I designed an user form in VBA. I key in data in the user form and entries get registered in the excel automatically in the background.
However, I was wondering if there is any way to convert VBA desktop user-form UI into mobile application. So that, I am able to key in data from the desktop and as well as Android(exactly same UI) with the data being entered in the same excel sheet- basically ,allowing me to do the same job while I am away from my laptop.
I have so many buttons with different functionalities in the user-form. I coded them in VBA modules. I need to achieve the same objective in the android app as well.
Please, if anyone have any resources, please refer it to me. I couldn't find the solution on YouTube.

Launch one addin from another addin in excel

We have developed a couple of excel addins with office-js and are finding that it would be really handy to be able to launch one addin from another addin and even possibly pass some data between the 2. Is the launching at least possible?
If you own both add-ins, you could navigate to one or the other via the URL's you placed in your manifest file. This could allow you to launch another add-in, however it would be inside the same task pane.
You could also pass data between both apps via url query parameters.
I've done this before when I made an add-in that was a landing page for other add-ins. When you clicked on a button for another tool, it would navigate to another add-in (which was a separate project) and pass the previous tool as a parameter in the URL so you could navigate back to where you came from.
It'd also be possible to share data on a private sheet inside Excel.
This would be security issue when an add-in will be able to manipulate others. For this obvious reason this is not possible.
Usually I advise to use https://officespdev.uservoice.com/ to request unimplemented feature, but based on your description, Office team most likely won't allow it anyway.

Possibilities of MS Outlook Web Add-ins on the header/Ribbon in web apps and Independent

I am working with outlook Web-Addins. Addin type is "ItemRead". Now I want some thing unrelated to mails as in i want to have button on header as i see the skype button on the top.
Also we can create Addin on mail compose. I am not sure if this is possible to have separate buttons on header separate from mail section
example in the image of skype button.
I have also tried with Outlook Add-in ModuleExtension but cannot seems to be work as expected in outlook web app.
The command controls for invoking add-on are described in manifest part of the add-in. Those controls will be displayed in predefined place of the UI depend on particular client design (Outlook online, Outlook desktop, etc.). As the developer you are able to set control's setting, such as title, icon and so on, but not the place where control will be displayed. This would be up to Microsoft dev/design team.
Bottom line: You are not able to place your control in the specific place of the client interface.
Module extension add-in currently available for Outlook 2016 desktop. There is request to make it available for Outlook online which you can upvote if you like.
Additional Questions:
So is it is not possible right right now?
Module extension add-in for Outlook online is not currently available. To place your control into the place you want is not available, either and never will be. This is because of obvious reasons ... can you imagine what's happen with user interface if every extension will be able to modify the UI as it needs? Total disaster.
Or can you help me with other option ?
Outlook add-in works with single item, as of the controls will appear when item (e-mail, appointment, etc.) selected or compose window invoked, there is nothing you can do.
Also one more thing that is it possible to store a custom global setting value for the outlook organization using addin or any other way?
To store the settings for particular mailbox, user inside organization, there is Office.context.roamingSettings object. If you need some global settings for your app for entire organization, you would set them inside JS part for this particular organization and make the deployment just withing this organization. In case you want to distribute the app via Office store and customize it per organization you may want to write some service which delivers custom settings for add-on on start-up. For example you have rest service which returns custom configuration depend on domain; in this case when add-on invoked you may request custom configuration by sending rest call with user domain and after cache it in mailbox.

window.opener does not work in Excel for Windows

I have built an Excel add-in, it opens a popup by window.open, then the add-in communicates with the popup site. I just realised that it does NOT work in Excel for Windows, the reason is that the popup can NOT get the host by $window.opener.
To illustrate this and avoid cross-domain, I have made a xml, which refers to the add-in and the test page. It works well in Excel Online in Chrome and in IE. However, while running it in Excel for Windows, $window.opener returns undefined.
Could anyone tell me what happened, and what's the workaround?
(for people who recommend Dialog API, please see this thread. So now neither Dialog nor window.open works in Excel for Windows).
UI.messageParent also won't work? It's from the official docs.
Example:
Office.context.ui.messageParent("Message from Dialog box")
Docs:
Delivers a message from the dialog box to its parent/opener page. The page calling this API must be on the same domain as the parent.
(I assume this isn't the Dialog API which you referring)

Control Windows Security popup when accessing a website via VBA Excel

Since an Excel file, I would like to connect that intranet of our company. My problem is that the login and the password are to be written in Windows Security popup.
I don't know how to manage that without using SendKeys... Another problem linked to that is that sometimes, the popup appears again, even if the login and password are good. Do youhave an idea to the way to catch such an event?
There is a solution with SendKeys. I lauch a script contained in a VBS file at the beginning of the macro. The script waits for the appearance a the popup and send the login/password in using SendKeys.

Resources