protobi / msexcel-builder Goto Github PK
View Code? Open in Web Editor NEWThis project forked from chuanyi/msexcel-builder
A simple and fast library to create MS Office Excel(>2007) xlsx files.
License: MIT License
This project forked from chuanyi/msexcel-builder
A simple and fast library to create MS Office Excel(>2007) xlsx files.
License: MIT License
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.
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 , 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.
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.
Hello there, following a trail from https://github.com/protobi/js-xlsx
I wish to understand if this lib msexcel-builder allows me to generate xlsx files with images embedded as protobi/js-xlsx does on a older fork ?
Cheers
i am updating the lib file with this pakage, but libFunction is not updating with this pakage name
Is there any option to set-up the generated excel sheet "fit to one page" i.e in the A4
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 repo is now published to npm as https://www.npmjs.com/package/protobi-msexcel-builder
Unprintable control characters in strings cause issues when opening the resulting Excel file
We found a problem with some content in 'export.xlsx'. Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes.
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.
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?
How can i add date in excel but without time ?
thanks for all
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 =)
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?
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
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.