Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
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,