Coder Social home page Coder Social logo

dwqs / js2excel Goto Github PK

View Code? Open in Web Editor NEW
99.0 99.0 23.0 1.63 MB

:relieved: :smiley: :imp: A simple module for excel and json converts each other, which works in the browser.

License: MIT License

JavaScript 24.09% TypeScript 75.91%
excel js json xlsx

js2excel's People

Contributors

dwqs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

js2excel's Issues

No error but returning an empty .xlsx

Normally I would use a more supported library to know it works for sure but there's a lack of options. Is the current build passing? Here's the data I used.

testData = [{
        "name": 'aa',
        "otherField": 55,
      }, {
        "name": 'bb',
        "otherField": 22,
      },]

 try {
        json2excel({
          testData,
          name: 'user-info-data',
          formateDate: 'yyyy/mm/dd'
        });
      } catch (e) {
        console.error('export error');
      }

Also I think the doc is missing a comma after data

try {
    json2excel({
        data
        name: 'user-info-data',
        formateDate: 'yyyy/mm/dd'
    });
} catch (e) {
    console.error('export error');
}

..and is formate in formateData a typo?

Thanks

Json2xls support multiple sheets

This is more of a request than an issue, but could you add support for multiple sheets when going from json to xls?

Basically I would like to be able to use this data (that comes out of xls2json) and convert it back to xls

Error Importing to Angular 6

Hello Everyone,

I am trying to import json2excel in my angular component, everything works except it gives an error on import on component, i have tried like this :
import { json2excel } from 'js2excel';
or like this :
import * as json2excel from 'js2excel';

And gives me this error when i compile :
ERROR in src/app/components/dashboard/transitions/transition/transition.component.ts(14,10): error TS2305: Module '"/home/arsen/Downloads/frontend/node_modules/js2excel/types/index"' has no exported member 'json2excel'.

Thanks.

Global is Not defined Angular 7

After adding in the fix #9 compiling in angular 7 is fine but then I run into this error. Please test if this is compatible with Angular 7

js2excel.min.js:1 Uncaught ReferenceError: global is not defined
at js2excel.min.js:1
at push../node_modules/js2excel/dist/js2excel.min.js.Zd (js2excel.min.js:1)
at Object../node_modules/js2excel/dist/js2excel.min.js (js2excel.min.js:1)
at webpack_require (bootstrap:78)
at Module../src/app/download/download.component.ts (main.js:264)
at webpack_require (bootstrap:78)
at Module../src/app/app-routing.module.ts (main.js:74)
at webpack_require (bootstrap:78)
at Module../src/app/app.module.ts (app.component.ts:12)
at webpack_require (bootstrap:78)

json2csv

Is this supported? Or is there a work-around for json2excel to result in a csv file?

Bug, when i use them in React components

Hello, I have a problem. When i use this library in react components, after download excel file on my computer, my site, DOM tree break down. I must refresh site.

blob is not defined

i try to run the example in the description but i get this error "blob is not defined",

is a tyscript file and i importing by commonjs method,

if i try to import is as es6 with

import excel from "js2excel";

this give me this error :

Cannot read property 'json2excel' of undefined

Error: Corrupted zip

It works fine on my local machine but breaks when i deploy on heroku with this error message

Uncaught Error: Corrupted zip : can't find end of central directory at f.readEndOfCentral (js2excel.min.js:3664) at f.load (js2excel.min.js:3676) at new f (js2excel.min.js:3621) at a.t.exports [as load] (js2excel.min.js:2937) at new a (js2excel.min.js:2902) at js2excel.min.js:28217 at cp (js2excel.min.js:28210) at FileReader.r.onload (js2excel.min.js:28957)
On Reactjs

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.