How to use the exceljs/dist/exceljs.min.js.Workbook function in exceljs

To help you get started, we’ve selected a few exceljs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Workiva / ixbrl-viewer / iXBRLViewerPlugin / viewer / src / js / tableExport.js View on Github external
TableExport.prototype._writeTable = function (data) {
    var wb = new Excel.Workbook();
    var ws = wb.addWorksheet('Table');
    
    var s = '';
    for (var i = 0; i < data.length; i++) {
        var row = data[i];
        for (var j = 0; j < row.length; j++) {
            var cell = row[j];

            var cc = ws.getRow(i+1).getCell(j+1);
            if (cell.type == 'fact') {
                cc.value = Number(cell.fact.value());
                cc.numFmt = '#,##0';
                ws.getColumn(j+1).width = 18;
                /* Make this an option - apply presentation signs */
                if (cell.negative) {
                    cc.value = Math.abs(cc.value) * -1;
github OpenSlides / OpenSlides / client / src / app / site / motions / services / motion-xlsx-export.service.ts View on Github external
public exportMotionList(motions: ViewMotion[], infoToExport: InfoToExport[], comments: number[]): void {
        const workbook = new Workbook();
        const properties = infoToExport.includes('speakers')
            ? sortMotionPropertyList(['identifier', 'title'].concat(infoToExport)).concat('speakers')
            : sortMotionPropertyList(['identifier', 'title'].concat(infoToExport));

        const worksheet = workbook.addWorksheet(this.translate.instant('Motions'), {
            pageSetup: {
                paperSize: 9,
                orientation: 'landscape',
                fitToPage: true,
                fitToHeight: 5,
                fitToWidth: properties.length,
                printTitlesRow: '1:1',
                margins: {
                    left: 0.4,
                    right: 0.4,
                    top: 1.0,

exceljs

Excel Workbook Manager - Read and Write xlsx and csv Files.

MIT
Latest version published 7 months ago

Package Health Score

78 / 100
Full package analysis