riyadhalnur / excelbuilderjs-node Goto Github PK
View Code? Open in Web Editor NEWA Node wrapper library for the excelbuilderjs library
Home Page: http://riyadhalnur.github.io/excelbuilderjs-node/
License: MIT License
A Node wrapper library for the excelbuilderjs library
Home Page: http://riyadhalnur.github.io/excelbuilderjs-node/
License: MIT License
Hi guys,
I can generate report either only data or with image.
As soon as I adding "generateFiles()" call the row order unpredictable.
But I need report with logo and data.
Please can you review an fix ASAP.
P.S. Why you are not supporting adding cell data "addData('A5', 'Hello World')"
I have header in my report when data start from row 10 and I have no idea what should I do???
var originalData = [
['Artist1', 'Album', 'Price'],
['Buckethead2', 'Albino Slug', 8.99],
['Buckethead3', 'Electric Tears', 13.99],
['Buckethead4', 'Colma', 11.34],
['Crystal Method5', 'Vegas', 10.54],
['Crystal Method6', 'Tweekend', 10.64],
['Crystal Method7', 'Divided By Night', 8.99]
];
var artistWorkbook = Excel.createWorkbook();
var albumList = artistWorkbook.createWorksheet({name: 'Album List'});
albumList.setData(originalData); //<-- Here's the important part
artistWorkbook.addWorksheet(albumList);
//artistWorkbook.generateFiles();
var data = Excel.createFile(artistWorkbook);
var result = new Buffer(data, 'base64');
res.setHeader('Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64');
res.setHeader('Content-Disposition', 'attachment; filename=' + 'demo.xlsx');
res.end(result);
I would like to create data as
["Simple Text", {values: [
{
"value": "Complex",
"size": 12,
"bold": true,
"color": "#ff0000"
},
{
"value": "Text",
"size": 18,
"color": "#0000ff"
}
]}]
based on Open XML definition https://msdn.microsoft.com/en-us/library/office/gg278314.aspx
Result should be
<si>
<t>Simple Text</t>
</si>
<si>
<r>
<rPr>
<sz val="12"/>
<color rgb="FF00000"/>
<bold/>
</rPr>
<t>Complex</t>
</r>
<r>
<t xml:space="preserve"> </t>
</r>
<r>
<rPr>
<b/>
<sz val="18"/>
<color theme="0000FF"/>
</rPr>
<t>0000ff</t>
</r>
</si>
Currently, setRowInstructions
takes an object that gets applied to all rows. However, according to the docs, setRowInstructions
should take (row number, object).
Maybe this is based on an earlier version?
Abiilty to generate sheet and upload to S3 and generate download link to file
Files created and downloaded are corrupted/ damaged
I spent 3 hours of my time to by searching in in your documentation how can I assign default font size.
Excel default font size is 11.
Finally I found in you hard coded default font setting and now expose to user.
StyleSeet.js line #28
this.fonts = [{}];
Workaround I have in my code
var wb = Excel.createWorkbook();
var stylesheet = wb.getStyleSheet();
stylesheet.fonts[0].size = 12;
Please update your documentation for other customers how to override default font settings.
Or better as accept argument in your constructor.
Excel handle default cell with and height definition:
from your library XML definition its missing.
I modified Worksheet.js line 374
var sheetFormatPr = util.createElement(doc, 'sheetFormatPr');
sheetFormatPr.setAttribute('baseColWidth', 11);
sheetFormatPr.setAttribute('defaultRowHeight', 15);
worksheet.appendChild(sheetFormatPr);
if (this.columns.length) {
worksheet.appendChild(this.exportColumns(doc));
}
worksheet.appendChild(sheetData);
Now XML Table including my ss:DefaultColumnWidth
But ss:DefaultRowHeight still default. Please can you look and fix it. Plus add into Worksheet constructor dynamic options.
There are methods in the original library which enable creation of the workbook asynchronously. This needs to be ported over.
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.