background preloader

Javascript

Facebook Twitter

Excel Does JavaScript! A VBA developer’s perspective - Apps for Office and SharePoint blog. Today's post is brought to you by Daniel Ferry. Daniel is a Microsoft Excel MVP. He runs the Excel Hero blog and the Excel Hero Academy where students learn advanced Excel techniques. He can be followed @excelhero or you can interact with the Excel Hero LinkedIn Group, where some of the smartest Excel people on the planet hang out. The Oscars Ballot Predictor is an Excel 2013 template that showcases a new apps for Office technology. The Oscar Ballot Predictor (OBP) relies on a custom app for Excel that I built specifically for this template. The following screenshot shows the UI for the Oscars Ballot Predictor. Figure 1. The Oscars Ballot Predictor app utilizes JSON from the PredictWise prediction engine data feed.

Apps for Office can be inserted into Office documents via the ribbon in a similar fashion as a shape or a chart, but at the heart of all apps is a web page, rendered by Internet Explorer. Figure 2. That’s it. For i = 1 To 24 CreateBinding NamesOfBindings(i) Next. D3 sort en version 2.0, la bibliothèque JavaScript open source pour la visualisation des données apporte une douzaine de nouveautés. Une nouvelle version de la bibliothèque JavaScript open source D3 (Data Driven Development) est disponible. D3 permet de manipuler des documents sur la base de données. Il peut être utilisé pour visualiser des données à la fois statistiques et interactives via HTML, SVG et CSS. Il est par exemple possible d’utiliser D3 pour générer un tableau HTML à partir d’un tableau de données. Les mêmes données peuvent également être utilisées pour créer un graphique SVG avec des transitions et interactions. Comme jQuery, la bibliothèque dispose d’une sélection générique d’éléments DOM, une propriété pour l’annotation dynamique, le traitement des éléments de transitions et des transformations.

La version 2.0 de D3 apporte une douzaine de nouvelles fonctionnalités et améliorations. D3 peut être utilisé sur tous les navigateurs modernes. Télécharger les exemples Télécharger le code source et la documentation sur GitHub Source : Site du projet Et vous ? Que pensez-vous de cet outil ? Build apps for Office. Discover what apps for Office are—and how to create them using standards-based technologies like HTML5, JavaScript, CSS3, and XML. Delve into the app development lifecycle. Learn where to start developing your apps, how to design and develop apps, and what to expect when you're ready to deploy an app for Office. Last modified: February 27, 2014 Applies to: Access app for SharePoint | Excel 2013 | Excel 2013 SP1 | Excel Online | Exchange Online | Exchange Server 2013 | Exchange Server 2013 SP1 | Outlook 2013 | Outlook 2013 SP1 | Outlook Web App | OWA for Devices | PowerPoint 2013 | PowerPoint 2013 SP1 | PowerPoint Online | Project 2013 SP1 | Project Professional 2013 | Word 2013 | Word 2013 SP1 Office.js: v1.0, v1.1 Apps for Office manifests schema: v1.0, v1.1 Starting in Office 2013, you now have the ability to create apps for Office.

In this section of the docs, we outline all the concepts you need to know up front to build great apps. Figure 1. Develop is the heart of the docs. Introducing XLSX.js | innovateJS. It’s amazing, isn’t it? For years JavaScript was just a small scripting language of relatively little consequence. Now, in symbiosis with HTML and CSS, it is evolving into a first class development platform. It’s still short of that, to be sure, but I have little doubt as to the destination. Now we see JavaScript playing a role in server-side scripting, 3D gaming, and content rendering, but the future will hold much more for the little language that could. XLSX.js Why? Current solutions for reading or writing XLSX data take one of two approaches; use ActiveX to communicate with Excel or send your data to a server for conversion. ActiveX This may work in some situations, but there are a number of concerns with this method: One, ActiveX is only supported on Windows, using Internet Explorer.

Server-side The biggest potential concerns with this solution, that I can think of, are whether you have the ability to run server-side code and whether it makes sense to run server-side code. How? Enjoy! Understanding the JavaScript API for Office. This topic provides a conceptual overview of the JavaScript API for Office, which is implemented in the Office.js file. This will download and cache the JavaScript API for Office files the first time your app loads to make sure that it is using the most up-to-date implementation of Office.js and its associated files for the specified version. Applies to: All app types Office.initialize = function () { }; You can use the value of the InitializationReason enumeration to implement different logic for when the app is first inserted versus when it already exists in the document.

The following example shows some simple logic you can add to the previous example to use the value of the reason argument to display how the task pane or content app was initialized. Office.initialize = function (reason) { // Checks for the DOM to load using the jQuery ready function. Applies to: Content and task pane app types All these forms of data access start from an instance of the abstract Document object.