Comments (3)
Hi @MartinM85,
No, the parameter needs to be a boolean or a Range with a boolean value. Everything in the Functions
class works like the Excel calculation engine. Entering =IF("2>1", TRUE, FALSE)
in Excel evaluates to #VALUE!
.
For what it's worth, here's what the add-ins code would look like.
await Excel.run(async (context) => {
const sheet = context.workbook.worksheets.getActiveWorksheet();
const x = context.workbook.functions.if(
context.workbook.functions.if(2 > 0, true, false),
"Yes",
"No"
);
x.load("value");
await context.sync();
console.log(x);
const cell = sheet.getCell(0, 0);
cell.values = [[x.value]];
await context.sync();
});
I'm going to close this issue, but please let me know if you have further questions.
from office-js-docs-reference.
Hi @AlexJerabek,
Thank you for the answer and the example.
What I know, the Graph API have endpoints which can invoke functions in the Excel files stored in OneDrive. Maybe if there is some person who is developing those endpoints I would have further questions related to invoking functions through the Graph API, because there is a lack of documentation.
from office-js-docs-reference.
The MS Graph API docs are hosted in this GitHub repo. There, you could create issues for any API with insufficient documentation. Stack Overflow is also a great place to ask how-to questions.
from office-js-docs-reference.
Related Issues (20)
- OfficeJS Word > Building Blocks HOT 1
- Excel.LocalImageCellValueCacheId doesn't explain how to retreive image from cache HOT 1
- Office Add-ins manifest Outlook HOT 3
- Help in Manifest.xml HOT 5
- is that possible to set set Signature Default from add-in HOT 8
- Request for Information on Upcoming Feature Releases for Mailbox HOT 2
- Office.DevicePermissionType.microphone is undefined HOT 3
- How to set CustomProperty and recognize emails generated with displayNewMessageFormAsync in an Outlook add-in? HOT 3
- Loading Text Length HOT 3
- Property 'isAllDayEvent' does not exist on type 'AppointmentCompose'.ts(2339) HOT 2
- Information on "addHandlerAsync" for "onMessageSend" in Office.js HOT 5
- Detect New Emails with Office.js in Outlook Add-ins HOT 2
- Reporting Issues or Bugs with OfficeJS HOT 1
- 请问如何在右键邮件是添加Menu HOT 2
- Example not relevant anymore HOT 4
- Positioning Your Add-In in the Same Location as "Viva Insights" in Microsoft Outlook HOT 1
- typeerror: cannot read properties of undefined (reading 'microphone') HOT 1
- how to show two buttons in notification message HOT 2
- Incomplete and incorrect information on new `inReplyTo` property of `Office.MessageCompose` HOT 8
- How to unprotect/Protect a document usin Office JS API. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-js-docs-reference.