Comments (9)
@chicagocomputerclasses sorry to hear that you're having trouble with fetch. Since using fetch to make web calls relates to general web development (and isn't specifically tied to Office Add-ins), I'd suggest you check out the Using Fetch article within the MDN docs. If you can't get things to work after reading that documentation, I'd suggest that you post to Stack Overflow and tag your question with fetch-api. You might also want to search already-existing questions/answers within that tag on Stack Overflow, as it's quite possible that the information you need already exists there.
from office-js-snippets.
Hi kbrandi, thanks, but I use fetch all the time for general web development and Node JS.
The question is whether fetch is included within Script Lab plugin environment, because it returns undefined and if it's not how can it be added as a library.
I can't find Script Lab documentation about adding libraries. Can you point me to it?
from office-js-snippets.
@chicagocomputerclasses thanks for clarifying your ask; I'll re-open this issue and see what I can find out about this.
from office-js-snippets.
Actually, @AlexJerabek has some info to share about this, so I'm going to hand this off to him. Thanks @AlexJerabek!
from office-js-snippets.
Hi @chicagocomputerclasses,
@Zlatkovsky created a gist using fetch in Script Lab: https://gist.github.com/Zlatkovsky/522183067333a47d8ec4f7e8a4823c57
It's a custom function that queries a stock ticker.
He notes that on IE11 you need to include the “fetch” polyfill. “whatwg-fetch” is a common one: https://github.com/github/fetch
Let me know if that helps unblock you.
from office-js-snippets.
Also, for context, older versions of Office Add-ins use the IE11 browser engine to display the web contents. Here's an article with that information: https://docs.microsoft.com/office/dev/add-ins/concepts/browsers-used-by-office-web-add-ins
from office-js-snippets.
Tagging @ElizabethSamuel-MSFT for awareness about Script Lab doc needs.
from office-js-snippets.
Did the provided information unblock you using fetch with Script Lab? We're looking to improve our Script Lab documentation and will figure out how to best address this documentation gap.
I'm going to close the issue, but please respond to the thread if you need something else and I'll happily reopen it. Thanks!
from office-js-snippets.
"Also, for context, older versions of Office Add-ins use the IE11 browser engine"
Sorry for not replying earlier but this has resolved my problem. I wasn't aware of this. After running window.navigator.userAgent I've discovered that it was in fact using Internet Explorer. I'm still not entirely sure why, because the system was windows 10 and office was 365 with newest updates. Anyhow, using a polyfill fixed this issue.
Thank You!
from office-js-snippets.
Related Issues (20)
- Basic shared API snippet doesn't work in Excel HOT 3
- Sort Table Data snippet uses inappropriate Sort object
- Request for another Fabric example HOT 4
- 'Create a named item' snippet throws error when running more than once HOT 3
- Error with "Find text matches within a range", Excel.SearchDirection doesn't exist in release version HOT 3
- Color Wheel "Just for fun" sample has errors HOT 4
- Modify "gradients" sample to make use of setCellProperties HOT 2
- Getting range from argument example HOT 4
- onSelectionChanged event - sample request HOT 5
- Pivot Table Samples are broken HOT 9
- Identifier a cell in excel HOT 7
- PowerPoint Shape and Tag APIs should be moved out of the preview folder
- Outlook Add-in Compose - Dynamic Control Button Text Updating HOT 1
- EWS SOAP request to fetch ICalUid HOT 2
- PowerPoint Shapes API preview bug when working with multiple shapes HOT 1
- Bug in Find text matches within a range HOT 3
- Get image from PowerPoint document HOT 9
- This repo is missing important files
- Error at context.sync() HOT 16
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-snippets.