GithubHelp home page GithubHelp logo

isabella232 / powerpoint-add-in-javascript-slicedatachunks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from officedev/powerpoint-add-in-javascript-slicedatachunks

0.0 0.0 0.0 1.56 MB

Shows how to use JavaScript in a PowerPoint 2013 task pane add-in to slice the current presentation into chunks of data.

License: Other

CSS 0.14% JavaScript 99.76% HTML 0.07% C# 0.03%

powerpoint-add-in-javascript-slicedatachunks's Introduction

page_type products languages extensions
sample
office-powerpoint
office-365
javascript
contentType technologies createdDate
samples
Add-ins
8/18/2015 1:32:10 PM

PowerPoint Add-in: Send a PowerPoint document in chunks to a service

Table of contents

##Summary This sample shows how to use JavaScript in a PowerPoint 2013 task pane add-in to get the current presentation and slice it into chunks of data in user-defined sizes. The data could then be submitted to a service (such as an e-book publishing service).

Prerequisites

This sample requires the following:

  • PowerPoint 2013.
  • Visual Studio 2013 (Update 5) or Visual Studio 2015, with Microsoft Office Developer Tools.
  • Any browser that supports ECMAScript 5.1, HTML5, and CSS3, such as Chrome 13, Firefox 5, Safari 5.0.6, or a later version of these browsers. If using Internet Explorer, requires Internet Explorer 10 to support the btoa encoding method.

Key components of the sample

The sample solution contains the following key files:

EBookPublisher project

EBookPublisherWeb project

##Description of the code The Adventure Works.pptx file is set as the Start Document property of the task pane add-in. The presentation is large enough (1,204 slides) to be sliced into a number of discrete chunks of data.

The sample demonstrates:

  • How to use JavaScript to retrieve the selected value from a drop-down list.
  • How to use the getFileAsync method to slice the file into chunks of data of particular sizes.
  • How to retrieve the data from each slice of the file by using the getSliceAsync method.

Build and debug

  1. In Visual Studio, press F5 to build and deploy the sample add-in.
  2. If the The Adventure Works.pptx file does not open automatically, open it. It is in the project at \EBookPublisher.
  3. On the Home ribbon, click Open in the EBook Publisher group.
  4. In the task pane add-in, choose a size for the data chunk.
  5. Click the Publish now! button.

The add-in displays the number of slices and the size of each slice, along with buttons you can use to view the content of each slice.

This sample displays the slice information to the user, but your add-in will probably send the data slices to a web service. The web service can then rebuild the presentation from the slices.

Troubleshooting

  • If the add-in starts with a blank presentation, ensure that the Start Document property of the EBookPublisher project is set to Adventure Works.pptx (not to New PowerPoint Presentation).
  • If the presentation opens in read-only mode, click the Enable editing button.
  • If the add-in does not appear in the task pane of the presentation, Choose Insert > My Add-ins > EBook Publisher.

Questions and comments

  • If you have any trouble running this sample, please log an issue.
  • Questions about Office Add-ins development in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [office-addins].

Additional resources

Copyright

Copyright (c) 2015 Microsoft. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

powerpoint-add-in-javascript-slicedatachunks's People

Contributors

davidchesnut avatar o365devx avatar rick-kirkham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.