Code Monkey home page Code Monkey logo

xlsxhelper's Introduction

xlsx/pptx helper - Utility code for spreadsheets and presentations

xlxshelper

Description

These classes makes it easier to create workbooks from scratch. The Workbook class is used to gather spreadsheets, while the Sheet class contain the actual data.

Use case

The primary use case here is to format data, coming from various source and processed by JavaScript, into CSV/ODT/XLSX files.

Usage

Instances of Workbook can be created without any parameter. Instances of Sheet are created by providing their initial content and name as an argument. Adding Sheet instance to a Workbook is done by calling Workbook.addSheet().

Example

var data = [
    [1, 2, 3],
    [4, 5, 6]];
var wb = new xlsxhelper.Workbook();
var sheet = new xlsxhelper.Sheet('SheetName', data);
wb.addSheet(sheet);
wb.createFile('odt', 'basefilename', downloader);

pptxhelper

Description

Classes to create PPTX presentations with images. This helper main goal is to semi-transparently allow the download of images for integration into the output.

Use case

Dynamic generation of a presentation slide depending on user-specific actions.

Usage

Create an instance of Presentation to start. Add slides using Presentation.addSlide(). Add text and images to a slide, or pre-populate it by using a short json description. To download the presentation, use Presentation.download().

Example

var pptx = new pptxhelper.Presentation();
var slide = pptx.addSlide();
slide.addText(0, 0, "Hello");
slide.addImage(5, 2, 1, 1, '/img/carret.jpg');
pptx.download('sample');

Installation

Include the 'dist/xlsxhelper.js' file somewhere before you use it.

xlsxhelper's People

Watchers

 avatar  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.