Code Monkey home page Code Monkey logo

msexcel-builder's People

Contributors

chuanyi avatar fa-b avatar forbeslindesay avatar jonnoftw avatar kokeksibir avatar leonardt avatar pietersv avatar valery-vitko 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

Watchers

 avatar  avatar  avatar  avatar  avatar

msexcel-builder's Issues

Compability with Angular 6

As I updated my app to Angular 6, I got the error Module not found: Error: Can't resolve 'fs'. In Angular 6 I don't have control over webpack (can't ng eject), and Angular can't ignore fs require.

I know the library is for Node and browser don't have have FS. But besides that, the lib works fine in the browser.

Error in xmlbuilder >=11 'Invalid character in name: fileVersion'

When using xmlbuilder v11 or later document generation fails with the following error:

     Error: Invalid character in name: fileVersion
      at XMLStringifier.assertLegalName (node_modules/xmlbuilder/lib/XMLStringifier.js:239:17)
      at XMLStringifier.name (node_modules/xmlbuilder/lib/XMLStringifier.js:46:21)
      at new XMLElement (node_modules/xmlbuilder/lib/XMLElement.js:30:36)
      at XMLElement.node (node_modules/xmlbuilder/lib/XMLNode.js:292:17)
      at XMLElement.element (node_modules/xmlbuilder/lib/XMLNode.js:187:30)
      at XMLElement.ele (node_modules/xmlbuilder/lib/XMLNode.js:611:21)
      at XlWorkbook.toxml (lib/msexcel-builder.js:153:10)
      at Workbook.generate (lib/msexcel-builder.js:926:43)

Custom number formats modify Style.prototype

Custom number formats modify Style.prototype , which causes problems when generating multiple workbooks.
Custom number formats from one workbook persist into subsequent workbooks.
They should be instance attributes, not class attributes.

Hint to use compression..

In addtion to the README doc, if you want to 'truly' compress the output xlsx file, an extra option

compression:'DEFLATE'

should be added when you call jszip.generateAsync(), for example

jszip.generateAsync(
{
  compression:'DEFLATE',
  type: "blob", 
  mimeType: 'application/vnd.ms-excel;'
}).then.....

This will (in many cases significantly) reduce the output file size.

lib file not updating

i am updating the lib file with this pakage, but libFunction is not updating with this pakage name

Excel-page setup

Is there any option to set-up the generated excel sheet "fit to one page" i.e in the A4

Number Format Issue

I'm currently having an issue when setting number formats in different cells.
The number format does not show when I open the exported file in Excel. Here is the code I use to set a specific cell's number format.

{
fill : { type: "solid", fgColor: "00FFFFFF", bgColor: "-" },
font : { name: "Calibri", sz: 8 },
numberFormat: "0.00",
set:0.5524822392015282,
}

For some reason, the numberFormat property works when I set ALL of the cells to use the same numberFormat (ex: '0.00').

this[key] is not a function

When setting cell data using sheet.set(), I am getting an error from the ms-excelbuilder.js file saying that this[key] is not a function? I followed the readme.md all the way through when creating my excel workbook.

Currency Format Not Supported

I want to format a cell as currency: '$#,###.00', but when I do this I get the error:

msexcel-builder.js:629 Uncaught Number format $#,###.00 not found.  Custom number formats not implemented yet

Is there any way I can render a number as currency?

Date

How can i add date in excel but without time ?
thanks for all

Support for cell formula?

Currently the library does not support adding formula in a cell. I could submit a PR but I don't know where to start. My only resource for now is this Office Open XML. Can someone guide me on how to implement this? Badly need it for a project =)

Use in browser - issue while opening generated excel

Using your code from README.md - successfully generated workbook and got in running in dev(Thanks for this!) (locally, and in dev it works, however , after deployment to TEST env it downloaded and says me when I'm trying to open it: Excel could not be opened....because file format or file extension is not valid.
Difference in size: 2kb, 116 vs 118(valid)
I had same issue with XLSX library, that time I used different bookType - changed xlsx to xls - and it was fine ( XLSX.writeFile(workbook, statements_export_${new Date().toUTCString()}.xls, { bookType: 'xls' });
Any suggestions for my case?
image
NOTwork.xlsx
works.xlsx

P.S: by the way interesting that both excels have content type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet instead of that which we set in mimeType - application/vnd.ms-excel

Published version of this fork?

I've been researching the easiest way to generate an excel sheet with colours and formatting, and this looks to be in good shape for that purpose.

Is there a version you publish to npm anywhere?

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.