Can I read and write custom attributes of Office documents through Microsoft Graph?
I'm setting custom attributes in my Office Addin via Office.context.document.settings.get() and would like to read those using Microsoft Graph without having users to open a file and use the add-in.
This isn't something supported by Microsoft Graph directly.
You could download a copy of the document, unpack it (Office documents are a zip archive) and then parse the OOXML directly. Settings are not encrypted so it shouldn't be to challenging parse them out.
Related
I want to create an editable link for an excel file stored in my Personal Ondrive account. According to the documentation Microsoft-Graph-Onedrive-docs, I should be able to use createLink API with payload as {"type": "edit", "view: "anonymous"}. But even after doing that the link opens a read-only excel file in excel online.
How do I open an editable excel file in excel online
I am using Personal Onedrive and calling the APIs via Microsoft graph explorer
If you have a .doc or .xls document you can not edit that. You'll need one of the newer Word, Excel formats like: .docx or .xlsx.
How do I upload files to the sharepoint shared documents folder using Microsoft Graph Client. I dont see any examples in the API documentation for the same. Is it possible to achieve the same via the Graph client API
The following works
Stream filecontents = new MemoryStream(filedata);
await client.Drive.Root.ItemWithPath(NameOfFile).Content.Request().PutAsync<DriveItem>(filecontents);
If you don't insist on upload file to SharePoint Shared Folder, you can use the OneDrive SDK to implement your requirement(Or MS Graph OneDrive API).
If you insist on upload file to SharePoint but not OneDrive(although the OneDrive is a particular SharePoint site),you can see the following answer:
We can use the following API to operate the Documents Folder:
Access the default drive (document library) for the given site.
/sites/{site-id}/drive
Enumerate the drives (document libraries) under the site.
/sites/{site-id}/drives
You can try the following API to upload files:
PUT /sites/{site-id}/drive/items/{parent-id}:/{filename}:/content
More infomation:
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/driveitem_put_content
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/sharepoint
If above solution does not work on your side, then the result will be we cannot upload files to SharePoint Shared Documents folder directly by MS Graph Client now. Currently, Microsoft just support limited common feature for the following:List/Site/ListItem.
If the API doesn't work on your side, you may submit a feature request to the Product group:https://officespdev.uservoice.com/
I need to integrate work with ms office in my application. I use the article https://msdn.microsoft.com/EN-US/library/office/dn911482.aspx, but when you send a file to url, ms word can not access it :(
For send I use: canOpenUrl/openUrl. Url string is:
ms-word:ofe|u|/var/mobile/Containers/Data/Application/85D7E895-0F0D-4BBF-B83A-41122B6A73E4/Documents/documents/doc_0_148856.docx|p|app_ms_return|c|doc_148856
So I tried to implicitly and explicitly specify the protocol:
ms-word:ofe|u|file:///var/mobile/Containers/Data/Application/85D7E895-0F0D-4BBF-B83A-41122B6A73E4/Documents/documents/doc_0_148856.docx|p|app_ms_return|c|doc_148856
I think that MS Word does not have access to file, but I do not know how to give it to him :(
Help pls :)
P.S.
There may be some other solution for transmission of file in MS Word, in addition to opening up access?
This kind of integration only works with files hosted in SharePoint or OneDrive. From that URL:
You can enable users who are running Office on an iOS device to open
and edit files stored in SharePoint or OneDrive from any application (...)
I have a shared xls file in One Drive. Which i want to view though Excel Online.
The Link would be sent to users through mails. The user will open it in browser by clicking it.
Just like the Google Docs Viewer
https://docs.google.com/viewer?url=http://spreadsheetpage.com/downloads/xl/time%2520sheet.xls
But, in Microsoft Excel Online and the file is in One Drive itself.
Thanks in advance.
Use WL.api to provide the path of the file stored on onedrive. This function returns a URL if it succeeds. You have to send this link through email. User will be able to view the invoice stored on your onedrive by clicking on this link using excel online.
:-)
How to read .xls(ms excel) file in blackberry application.
Is there any api available?
There's nothing in the public BlackBerry API to do this, but you could probably easily port an opensource API to do what you need. A quick search with Google for "Java Excel API" brings bacK:
http://jexcelapi.sourceforge.net/
The Java Excel API wont work because Blackberry api lacks java.io.File class,Instead try for CSV.
how to create a Excel format file?