Giter Site home page Giter Site logo

xlsx-to-xml's Introduction

xlsx-to-xml

This tool is a NodeJS app that converts spreadsheets (currently XLSX files are the only file type supported) into simple XML output.

Here's an example of what it can do. This table

 cat  feline  fish  spot
 dog  canine  bone  fido
 monkey  simian  banana  bubbles

can be converted into this XML:

<row>
    <cell>cat</cell>
    <cell>feline</cell>
    <cell>fish</cell>
    <cell>spot</cell>
</row>
<row>
    <cell>dog</cell>
    <cell>canine</cell>
    <cell>bone</cell>
    <cell>fido</cell>
</row>
<row>
    <cell>monkey</cell>
    <cell>simian</cell>
    <cell>banana</cell>
    <cell>bubbles</cell>
</row>

Row and cell tag names can be customised to whatever you want.

The backend is a NodeJS server that serves the static index.html and its resources. The conversion operations are performed entirely on the front-end, utlising several libraries - namely js-xlsx (https://github.com/SheetJS/js-xlsx) to read the spreadsheet and RactiveJS (https://github.com/ractivejs/ractive) to render the UI.

To install:

  1. Download or clone the latest version.
  2. Install NodeJS (which should include NPM) if you don't have it installed already (https://nodejs.org).
  3. Browse to the folder on the command line and enter "npm install" to download Node dependencies.

To use:

  1. You need to run in a modern browser. So far I've tested in Chrome and Firefox (versions 50 and 43, respectively, at time of writing).
  2. Browse to the folder on the command line and enter "node server.js" to run the app on the default port (8888). To run on a different port include the port number as the second argument to the node command when starting the app (e.g. "node server.js 8889").
  3. A browser should open automatically or open one yourself and browse to the app's URL, which should be shown in the console (http://localhost:8888 if on the default port).
  4. Choose the file you want to convert and the app will process it immediately, outputting each worksheet in its own tab.
  5. Use the conversion settings and other controls to customise the tags and tabs and remove rows from the output.

NOTE: The version of js-xlsx included in this package is a slightly modded version of the latest version from May 2016. The pull request is in the queue (SheetJS/sheetjs#420).

xlsx-to-xml's People

Contributors

lukenofurther avatar

Watchers

 avatar  avatar

Forkers

ilyasstalha

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.