office-js

Offset in JavaScript UDF? VBA for Example

╄→гoц情女王★ 提交于 2019-12-11 16:36:19
问题 I asked the same question before here (For Loop JavaScript? VBA for Example) but I was not specific enough so I did not get the feedback I was looking for. How can I create a similar code in JavaScript? This might help https://poi.apache.org/apidocs/dev/org/apache/poi/ss/formula/functions/Offset.html What I have here is a Parent-Child Cost Roll-up Calculation in VBA. Column I has the formula that is in Column H. I want to create a formula similar to this in JavaScript. Function

Save the initial state of a workbook

百般思念 提交于 2019-12-11 16:19:15
问题 I would like to save the initial state of a workbook (or an Excel application) in the beginning, so that I could always get back to it regardless of modification on the workbook by my Add-in. I tried some following code in Home.js : (function() { "use strict"; Office.initialize = function(reason) { $(document).ready(function() { app.initialize(); initial(); $('#getInitial').click(getInitial); }); }; var ctxInitial; function initial () { ctxInitial = new Excel.RequestContext(); } function

setSolidColor throwing unexpected error in Excel Javascript on chart series

流过昼夜 提交于 2019-12-11 16:13:20
问题 The setSolidColor method of the chart series class is throwing an error in Excel 1907 Build 11901.20080 but NOT in Excel 1902 Build 11328.20116. To demo the error I modified the examples in Script Lab, specifically the section under "charts" called "Create Charts - Create column clustered, line, ...". The data setup is required, here is the code from Scirptlab. This doesn't demo the error just sets up the data. async function setup() { await Excel.run(async (context) => { context.workbook

The entire worksheet is not editable after protect the sheet with some locked cells

时光怂恿深爱的人放手 提交于 2019-12-11 16:11:59
问题 I have issue with protect worksheet in excel online. I will unlock all of the cells in the worksheet, and lock one range, then protect worksheet, after that nothing is editable in the worksheet, even the cells are unlocked.This issue only happens for excel online version, works fine for installed desktop version. Anyone has idea how to solve the problem or the is an officeJs bug? Excel.run(function (ctx) { //Worksheet var sheet = ctx.workbook.worksheets.getItem("Sheet1"); //Entire Range var

using ExtendedProperties in the Outlook REST API to set Message item headers

感情迁移 提交于 2019-12-11 15:55:25
问题 It is possible to request message headers in the C# API: https://msdn.microsoft.com/en-us/library/microsoft.exchange.webservices.data.item.internetmessageheaders(exchg.80).aspx Is it possible to set item message headers instead, using the REST API via ExtendedProperties ? This would allow us to remove the last remaining EWS SOAP call we have to do, which is to add a header to an Outlook draft. The reasons for wanting this: Apparently the EWS SOAP API seems to have a failure rate of 10 - 20%

Block add-in for Gmail Accounts in Outlook for Mac

Deadly 提交于 2019-12-11 15:52:46
问题 Is there any way not to support a Gmail account type in Outlook for Mac? Since Gmail accounts support has been announced I need to support also this account types. However, EWS requests does not work for Gmail. I would like to temporary block Gmail users installing my add-in, until I will adjust by backend, and switch to REST. The only idea I have now is to detect accountType in JS and inform user that cannot use this add-in for now. 回答1: Add-in support for Gmail Accounts in Mac Outlook is

Document custom properties not save in Office 365 for Windows

瘦欲@ 提交于 2019-12-11 15:45:20
问题 My office js Word add-in code saves a custom property to the document customproperty collection. The code for saving is as below Word.run(function (context) { //method accepts property name plus value context.document.properties.customProperties.add(propertyname, value); return context.sync() .then(function () { console.log("Property saved"); }) .catch (function (e) { console.log("Error occured inserting property " + e.message); }); }); When I create the document using Office 365 for Windows

Loading error for office addin - sometime - error office 365 has been configured to prevent indi

一个人想着一个人 提交于 2019-12-11 15:16:23
问题 My office addin works good most of the time, but some time it shows error as below Office 365 has been configured to prevent individual acquisition of office store addins 回答1: Usually this error is an indicator that your administrator settings doesn't allow individual apps in Office 365. Since you say that your settings has been set to prevent individual acquisition, your add-in should technically never work unless you have added it to your organisation as an administrator in which case it

Is there any Office.js API to get user input

大憨熊 提交于 2019-12-11 14:57:01
问题 In task pane of our Office.js WORD add-in, we need to get a user input and display in the document. Is it even possible to get user input in an Office.js add-in. If so, is there any Office.js API for that? 回答1: please check our this article with details on how to do it.https://docs.microsoft.com/en-us/office/dev/add-ins/develop/dialog-api-in-office-add-ins 来源: https://stackoverflow.com/questions/52846385/is-there-any-office-js-api-to-get-user-input

Office-JS API: Fetching filtered data from table

给你一囗甜甜゛ 提交于 2019-12-11 13:35:13
问题 I am trying to figure out a way to fetch only the filtered values from a table if a filter is active in Office-JS API. Right now the only way I have figured to fetch all the table data is from the table range values property: var table = tables.getItemAt(0); var tableRange = table.getRange(); tableRange.load("values"); ctx.sync().then(function () { // This returns all the values from the table, and not only the visible data var values = tableRange.values; }); Any ideas on how I can proceed to