Giter VIP home page Giter VIP logo

daggianama / json2excel Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 17.23 MB

Web application that allows you to convert JSON-formatted text into a downloadable Excel file. The process involves taking text containing JSON data and reorganizing it into two columns in an Excel file.

Home Page: https://json2excel-dqs.vercel.app

HTML 17.77% JavaScript 1.21% TypeScript 79.44% CSS 1.58%
excel json typescript xlsx

json2excel's Introduction

JSON to Excel Converter (json2excel)

Version: 1.0.0
Author: Daggiana Madrid
License: ISC

Description

JSON to Excel Converter (json2excel) is a versatile tool designed to streamline the process of converting JSON data into Excel spreadsheets effortlessly.
Whether you are working with complex data structures or simple JSON objects, this tool simplifies the conversion process, making it easy to generate Excel files with just a few simple steps.
In addition it compares excel to JSON checking for new elements.

It is a tool created and customised for DQS Consulting, Barcelona.

Key Features

  • Efficient Conversion: Convert JSON data to Excel format with ease.
  • Dependencies: Utilizes popular libraries such as XLSX and FileSaver for reliable conversion and file-saving capabilities.
  • Styling Options: Customize the appearance of your Excel sheets with support for styles and formatting.
  • Easy Integration: Simple scripts for testing, client installation, and running the client make it easy to incorporate into existing projects.
  • Developer-Friendly: Built with TypeScript, Jest for testing, and Tailwind CSS for styling.

Getting Started

  1. Clone the repository: git clone https://github.com/daggianama/json2excel.git
  2. Install client dependencies: npm run client-install
  3. Run the client: npm run client-start

For more details, refer to the documentation.

Usage Instructions

To convert 3 language JSON to Excel table:

  • Data Input: In the input area, paste or type the JSON-formatted text you want to convert.
  • Process: Click the "JSON to Excel" button to initiate the conversion.
  • Download: Once processed, the generated Excel file is available for download.

IMPORTANT! For the 2 following cases

-You must have an Excel file generated with just the related info, excel 3 languages labels plus header and no spaces around it.
-All labels must have text for each language field, if not issues will be shown later, NO EMPTY FIELDS. A recommendation is to select just the area of data(all labels without new tag) to be compared and paste it on a new empty Excel file, like the image above.

ExcelReference

COMPARE 3 language JSON with an Excel model file:

  • Data Input: In the input are to select a file from you computer, select the Excel file.
  • Process: Click the "Compare & download" button to initiate the comparison.
  • Download: Once processed, the generated Excel file is available for download.

To convert Excel table to 3 language JSON:

  • Data Input: In the last input area: Excel to JSON, select a file from you computer, select the Excel file.
  • Process: Click the "Excel to JSON" button to initiate the conversion.
  • Download: Once processed, the generated Excel file is available for download.

How It Works

The script performs the following steps:

  1. Takes the JSON-formatted input text and removes commas.

  2. Splits the text into lines to process each line separately.

  3. Ignores blank lines and those containing ".comment" (optional).

  4. Removes curly braces "{}" from each line to obtain key-value pairs.

  5. Splits each line by ':' and removes whitespace around the separator.

  6. Organizes the data into two columns: "Name" and "Value". Key-value pairs are converted into rows in the Excel file.

  7. Creates an Excel file with the organized data.

  8. Generates a unique file name for download.

  9. Allows the user to download the Excel file with the processed data.

Example Input in JSON format:

json Copy code { "Name": "John", "Age": 30, "City": "New York" } Output in the Excel file:

Name John Age 30 City New York

Note

The script can be customized to include or exclude specific data, depending on the user's needs. Additionally, additional features can be added based on specific project requirements.

License

This project is licensed under the ISC License - see the LICENSE file for details.

json2excel's People

Contributors

daggianama avatar

Watchers

 avatar

Forkers

dqsspain

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.