Programmatically read/write Excel Web App on Office 365 - excel

I'd like to read and write cells on an Excel Web App hosted at Office 365. There seems to be conflicting information online whether API access to EWA is even possible.
I would expect to use some of the RESTful APIs, such as the following:
https://[myoffice365site]/personal/[myusername]/Documents/[myworkbook].xlsx/model
But when I do, I receive a generic 404 error. I've also been unable to find any tokens or API keys in my Office 365 account.
Has anyone had any luck accessing an Excel Web App using C# or Javascript?
Thank you!

hbeam
Yes, we do have an API that allows reading and writing to cells in Excel Web App via a JavaScript library. This code needs to be running in an "App for Excel" which is embedded in the Excel document. Here's some documentation to get you started: http://msdn.microsoft.com/en-us/office/dn448457
If you reply with some additional information about what you are trying to accomplish with the app, I can give further guidance on which API to use and how to use it.
A RESTful API to accomplish what you're asking is not currently available. We've heard from many developers and customers who are interested in that type of programmability, and we'll take your feedback into account.
Thanks for the question!
-Michael

Related

Pull data from Excel online spreadsheet for use on a web page

Does anyone know if it is possible to pull data from an Office 365 Excel online sheet for use on a web page.
Essentially what I'm looking for is a Microsoft version of the Google Sheets API: https://developers.google.com/sheets/api/quickstart/js - unfortunately I'm not able to use Google sheets due to the project being located in China (where Google services are blocked).
Does anyone know if this exists?
There is Mic.rosoft Graph API and probably more suitable to your needs Excel Rest API

Is there any Node js or REST API to create new users in office 365.

I have purchased office 365 essentials plan. I have got an admin account. Office provides user interface to add new users under this main admin account.
What I need is I want a Node js or REST API to create users on this account. I have googled well, can't met anything like this. Anyone can provide any samples on this. Any help would be appreciable.
Office 365 Users are hosted in the background by Azure Active Directory. I believe you should be able to create new accounts for your Office 365 programmatically using the Azure Active Directory Graph API, or probably even better, using the Microsoft Graph API.
Check out the documentation here:
https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/user_post_users
You should be able to get a jump-start using our public samples located here:
https://graph.microsoft.io/en-us/code-samples-and-sdks
I hope this helps!

Missing fields in responses from Office 365 RESTful API

I am using node-outlook library to work with Office 365 RESTful API.
When I fetch the contacts I cannot find data for such fields as "Mobile Phone 2", "Other Phone", "Business fax", "Notes". Although they are perfectly accessible via Office 365 web GUI.
It seems to me that these fields are just not exposed through the API at all. Am I right saying that or there actually is some tricky way to access them?
Thank you.
These properties aren't currently supported in Office 365 REST API as they are not commonly used. Let us know more about the scenario, and we may be able to suggest an alternate way of implementing it.

Using Office 365 API with only one account

I am trying to use the Office 365 API to write events to the calendars of anyone at our organization. This should not involve the users logging in to Office 365 at any point. The events to add are written out at various points during the day (when the user who would own the event may not even be at a computer), so the per-user token approach doesn't even make sense.
It appears that Microsoft provides an alternative that uses a service account. This account can be used to write to any user's calendar (or sending email as any user, etc.). However, I can't find any documentation on doing this. Could anyone provide a link to it?
I found a blog post on this topic: http://blogs.msdn.com/b/exchangedev/archive/2015/01/21/building-demon-or-service-apps-with-office-365-mail-calendar-and-contacts-apis-oauth2-client-credential-flow.aspx
Also, if you aren't using Microsoft's client library for this (for example, if you use linux), you'll need to see this too: Office 365 Rest API - Daemon week authentication

Authenticating Excel Task Pane app to CRM Online

I would like to write an Excel Task Pane app to interact with CRM Online - to take data from the Excel worksheet, process it and push it into a CRM entity record. My Excel users are on Office 365, as is CRM Online (obviously). We are using ADFS 2.0.
The specific problem I am experiencing is that I do not know how to get authentication to work for the Task Pane app: specifically, to the OData endpoint via JavaScript. Authentication is not my area, so I don't know how to precisely phrase this next requirement, but as we are using Office 365/CRM Online/ADFS then I need to use the logged-in user's Windows AD credentials to authenticate the request.
As far as I can tell, it is not possible to authenticate the Task Pane app directly with CRM Online, and I would like to know if that is known to be true, and if not what method(s) I can use.
I do know that there is a hack for indirect authentication published by a couple of people (http://survivingcrm.com/2013/12/connecting-crm-online-odata-feed-excel-2013-power-query/ or http://www.crmconsult.co.uk/connecting-to-crm-20112013-with-odata-in-excel-2013/) which authenticates the user via the CRM plug-in and then allows other OData connections to succeed - but it doesn't work for me, and I'm averse to rolling out functionality to users which relies on back-door methods.
In the end, I ended used using SOAP in VBA instead of oData in the Task Pane, which meant I was able to use Jason Lattimer's hard work from http://jlattimer.blogspot.co.uk/2015/02/soap-only-authentication-using-vba.html - I don't think there is any way I would have figured out the Authentication piece without that post, so many thanks to him.

Resources