Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: SimpleExcel.Writer.XLSX is not a constructor #12

Open
unreg opened this issue Oct 14, 2016 · 10 comments
Open

TypeError: SimpleExcel.Writer.XLSX is not a constructor #12

unreg opened this issue Oct 14, 2016 · 10 comments

Comments

@unreg
Copy link

unreg commented Oct 14, 2016

If use example from main page get error:

TypeError: SimpleExcel.Writer.XLSX is not a constructor
@aoakeson
Copy link

I am getting the same error: Looking at the source code, XLSX doesnt exist.

var Writer = {
CSV: CSVWriter,
TSV: TSVWriter
};

@vipullimbachiya
Copy link

:) There are many on github who saves your time, this one wasted instead...

@davewilton
Copy link

I wish I'd read this first! Please remove this project or state it is a work in progress!

@zh-wowtv
Copy link

zh-wowtv commented Feb 2, 2017

So XLSX does not exist? Too bad.

@marcioarp
Copy link

I have this error too !

@DaviAragao
Copy link

Same trouble.

@kaabsimas
Copy link

Yeah. I wouldn't say it's a waste of time... if I hadn't wasted my time. It's really a great library, but I just needed to read xls/xlsx files, and it's the only thing it doesn't.

@VanWade
Copy link

VanWade commented Jan 12, 2018

Same error.Is there anyone that get a great solution to edit xls/xlsx online?

@sujkh85
Copy link

sujkh85 commented Jan 23, 2018

Edit it as follows

      // write an XLSX file            
      var xlsxWriter = new SimpleExcel.Writer.CSV();
      var xlsxSheet = new SimpleExcel.Sheet();
      var Cell = SimpleExcel.Cell;
      xlsxSheet.setRecords([
         [new Cell('ID', 'TEXT'), new Cell('Nama', 'TEXT'), new Cell('Kode Wilayah', 'TEXT')],
        [new Cell(1, 'NUMBER'), new Cell('Kab. Bogor', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(2, 'NUMBER'), new Cell('Kab. Cianjur', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(3, 'NUMBER'), new Cell('Kab. Sukabumi', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(4, 'NUMBER'), new Cell('Kab. Tasikmalaya', 'TEXT'), new Cell(2, 'NUMBER')]
      ]);
      xlsxWriter.insertSheet(xlsxSheet);
      xlsxWriter.saveFile()

@MahbbRah
Copy link

MahbbRah commented Dec 2, 2019

Edit it as follows

      // write an XLSX file            
      var xlsxWriter = new SimpleExcel.Writer.CSV();
      var xlsxSheet = new SimpleExcel.Sheet();
      var Cell = SimpleExcel.Cell;
      xlsxSheet.setRecords([
         [new Cell('ID', 'TEXT'), new Cell('Nama', 'TEXT'), new Cell('Kode Wilayah', 'TEXT')],
        [new Cell(1, 'NUMBER'), new Cell('Kab. Bogor', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(2, 'NUMBER'), new Cell('Kab. Cianjur', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(3, 'NUMBER'), new Cell('Kab. Sukabumi', 'TEXT'), new Cell(1, 'NUMBER')],
        [new Cell(4, 'NUMBER'), new Cell('Kab. Tasikmalaya', 'TEXT'), new Cell(2, 'NUMBER')]
      ]);
      xlsxWriter.insertSheet(xlsxSheet);
      xlsxWriter.saveFile()

This one working. but saving file is awkward. a file is saving named as "download" with no extension of it LOL 👯‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests