jsonrawtoxlsx is library to convert json raw (array) into xlsx file

Overview

Welcome to jsonrawtoxlsx 👋

downloads License: MIT snyk.io

What is jsonrawtoxlsx?

jsonrawtoxlsx is library to convert json raw (array) into xlsx file

⚡️ Installation

using npm

npm install jsonrawtoxlsx

using yarn

yarn add jsonrawtoxlsx

using pnpm

pnpm add jsonrawtoxlsx

🚀 Usage

Use to save as file:

const jsonrawtoxlsx = require('jsonrawtoxlsx');
const fs = require('fs');

const json = [
  {
    name: 'John',
    age: 27,
    job: 'Software Engineer',
  },
];

const buffer = jsonrawtoxlsx(json);

fs.writeFileSync('example.xlsx', buffer, 'binary');

Or use as express middleware. It adds a convenience xlsx method to the response object to immediately output an excel as download.

const express = require('express');
const jsonrawtoxlsx = require('jsonrawtoxlsx');
const app = express();
const PORT = 3000;

const data = [
  {
    name: 'John',
    age: 27,
    job: 'Software Engineer',
  },
  {
    name: 'John',
    age: 27,
    job: 'Software Engineer',
  },
];

app.use(jsonrawtoxlsx.middleware);
app.get('/', function (req, res) {
  res.xlsx('example.xlsx', data);
});

app.listen(PORT, function (err) {
  if (err) console.log(err);
  console.log('Server listening on PORT', PORT);
});

🤝 Contributing

Anyone can contribute with issues and PRs. If you're submitting a pull request, always create a new branch to work your changes, and try squashing commits down if possible. Always test any new code and make sure npm test passes and npm run test:cover for code coverage is adequate before opening a PR.

Author

👤 Arie Syukron

Show your support

Please ⭐️ this repository if this project helped you!

📝 License

Copyright © 2022 Arie Syukron.
This project is MIT licensed.

happy coding!

You might also like...

javascript library to convert a list of objects to a nested json output format, depending on the names in the list

formToNestedJson javascript "library" to convert a list of objects to a nested json output format, depending on the names in the list Basic usage Give

Aug 2, 2021

Yunisdev-table2csv - Lightweight library to convert HTML table to CSV file

Installation Add following HTML before body end: script src="https://yunisdev.github.io/table2csv/table2csv.min.js"/script !-- or -- script src

Oct 19, 2020

CLI utility that parses argv, loads your specified file, and passes the parsed argv into your file's exported function. Supports ESM/TypeScript/etc out of the box.

cleffa CLI tool that: Parses argv into an object (of command-line flags) and an array of positional arguments Loads a function from the specified file

Mar 6, 2022

A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM deffiniation and appropriate file structure.

Welcome to function-stencil 👋 A quickstart AWS Lambda function code generator. Downloads a template function code file, test harness file, sample SAM

Jun 20, 2022

Serve file server with single zip file as file system in Deno.

zipland Serve file server with one-single zip file in Deno. Support zip just zip32 with deflated or uncompressed serving plaintext deflate Examples Yo

Nov 2, 2022

Feel free to create new file, don't hesitate to pull your code, the most important thing is that the file name here must match your nickname so that file does not conflict with other people.

Hacktoberfest Indonesia Apa Itu Hacktoberfest ? Hacktoberfest adalah acara tahunan yang bertujuan untuk mendorong berkontribusi kedalam ekosistem open

Dec 15, 2022

Convert JSON to human readable HTML

json.human.js: Json Formatting for Human Beings A small library to convert a JSON object into a human readable HTML representation that is easy to sty

Dec 3, 2022

Convert Your Kindle highlight & Note to Markdown/JSON

kindle-highlight-to-markdown Convert Your Kindle highlight & Note to Markdown/JSON Install Install with npm: npm install kindle-highlight-to-markdown

Dec 31, 2022

A command-line tool to convert Project Zomboid map data into Deep Zoom format

A command-line tool to convert Project Zomboid map data into Deep Zoom format

pzmap2dzi pzmap2dzi is a command-line tool running on Windows to convert Project Zomboid map data into Deep Zoom format. Features Supports both python

Dec 31, 2022
Comments
  • [Snyk] Upgrade husky from 8.0.1 to 8.0.2

    [Snyk] Upgrade husky from 8.0.1 to 8.0.2

    This PR was automatically created by Snyk using the credentials of a real user.


    Snyk has created this PR to upgrade husky from 8.0.1 to 8.0.2.

    :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


    • The recommended version is 1 version ahead of your current version.
    • The recommended version was released 21 days ago, on 2022-11-08.

    Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

    For more information:

    🧐 View latest project report

    🛠 Adjust upgrade PR settings

    🔕 Ignore this dependency or unsubscribe from future upgrade PRs

    opened by syukronarie 1
Releases(release-v1.0.6)
  • release-v1.0.6(Jul 17, 2022)

    What's Changed

    • Adding vulnerability check in README.md by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/32
    • Update patch for release by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/33

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/compare/release-v1.0.5...release-v1.0.6

    Source code(tar.gz)
    Source code(zip)
  • release-v1.0.5(Jul 17, 2022)

  • release-v1.0.4(Jul 17, 2022)

    What's Changed

    • Update readme by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/31

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/compare/release-v1.0.3...release-v1.0.4

    Source code(tar.gz)
    Source code(zip)
  • release-v1.0.3(Jul 17, 2022)

    What's Changed

    • only fix version in package.json due to add keywords in package.json
    • release v1.0.3 by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/30

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/compare/release-v1.0.2...release-v1.0.3

    Source code(tar.gz)
    Source code(zip)
  • release-v1.0.2(Jul 17, 2022)

    What's Changed

    • Update readme
    • Update CI and code coverage
    • Open to new contributors

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/compare/release-v1.0.1...release-v1.0.2

    Source code(tar.gz)
    Source code(zip)
  • release-v1.0.1(Jul 14, 2022)

    fix minor in middleware

    What's Changed

    • update middleware by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/3
    • fix minor in middleware by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/4

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/compare/release-v1.0.0...release-v1.0.1

    Source code(tar.gz)
    Source code(zip)
  • release-v1.0.0(Jul 14, 2022)

    You can able to convert json to xlsx and also has middleware for express.

    What's Changed

    • release 1.0.0 by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/1
    • update workflows by @syukronarie in https://github.com/syukronarie/jsonrawtoxlsx/pull/2

    New Contributors

    • @syukronarie made their first contribution in https://github.com/syukronarie/jsonrawtoxlsx/pull/1

    Full Changelog: https://github.com/syukronarie/jsonrawtoxlsx/commits/release-v1.0.0

    Source code(tar.gz)
    Source code(zip)
Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

package-fetcher Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour c

AILI Fida Aliotti Christino 2 Mar 29, 2022
Tiny JavaScript library (1kB) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Zero dependency tiny JavaScript library (1kB bytes) by CurrencyRate.today, providing simple way and advanced number, money and currency formatting and removes all formatting/cruft and returns the raw float value.

Yurii De 11 Nov 8, 2022
A plugin for Obsidian that shows raw BibTeX bibliography entries in a prettier way

Pretty BibTeX Obsidian Plugin This plugin renders bibliography entries in the BibTeX format in a more readable way. Demonstration Creating a standard

Sandro Figo 8 Dec 30, 2022
JCS (JSON Canonicalization Scheme), JSON digests, and JSON Merkle hashes

JSON Hash This package contains the following JSON utilties for Deno: digest.ts provides cryptographic hash digests of JSON trees. It guarantee that d

Hong Minhee (洪 民憙) 13 Sep 2, 2022
Converts an iterable, iterable of Promises, or async iterable into a Promise of an Array.

iterate-all A utility function that converts any of these: Iterable<T> Iterable<Promise<T>> AsyncIterable<T> AsyncIterable<Promise<T>> Into this: Prom

Lily Scott 8 Jun 7, 2022
This package is for developers to be able to easily integrate bad word checking into their projects.\r This package can return bad words in array or regular expression (regex) form.

Vietnamese Bad Words This package is for developers to be able to easily integrate bad word checking into their projects. This package can return bad

Nguyễn Quang Sáng 8 Nov 3, 2022
Pretty-print-json - 🦋 Pretty-print JSON data into HTML to indent and colorize (written in TypeScript)

pretty-print-json Pretty-print JSON data into HTML to indent and colorize (written in TypeScript) 1) Try It Out Interactive online tool to format JSON

Center Key 87 Dec 30, 2022
✏️ A small jQuery extension to turn a static HTML table into an editable one. For quickly populating a small table with JSON data, letting the user modify it with validation, and then getting JSON data back out.

jquery-editable-table A small jQuery extension to turn an HTML table editable for fast data entry and validation Demo ?? https://jsfiddle.net/torrobin

Tor 7 Jul 31, 2022
JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

JSON Visio is data visualization tool for your json data which seamlessly illustrates your data on graphs without having to restructure anything, paste directly or import file.

Aykut Saraç 20.6k Jan 4, 2023
Prisma 2+ generator to emit a JSON file that can be run with json-server

Prisma JSON Server Generator A Prisma generator that automates creating a JSON file that can be run as a server from your Prisma schema. Explore the o

Omar Dulaimi 14 Jan 7, 2023