adjusting xlsx.xl.worksheets['sheet1.xml']'s sheetData has no effect?

adjusting xlsx.xl.worksheets['sheet1.xml']'s sheetData has no effect?

h.causevich.causevic Posts: 6Questions: 3Answers: 1
edited November 2022 in Free community support

Any clue why this has no effect?

    {
        header: true,
        extend: "excel",
        text: "Excel",
        exportOptions: {
            modifier: {
                page: 'current'
            },
            columns: [ 1,2,3,4 ],
        },
        fieldSeparator: ";",
        customize: function (xlsx) {
            var sheet = xlsx.xl.worksheets['sheet1.xml']
            $('mergeCells', sheet).remove(); //remove cell merge A1:D1
            $('row[r="2"]', sheet).children().attr("s", "0") //remove bold
            let firstRow = $('row[r="1"]', sheet)
            firstRow
                .append($("<c></c>")
                .attr({"t":"inlineStr","r":"B1", "s":"0"})
                .append($("<is></is>")
                    .append($("<t></t>")
                        .attr("xml:space", "preserve")
                        .text("<<some list name>>")
                    ))
            )
            $('row c[r=A1] t', sheet).text( "Listname:" );
        }
    },

console.logging the xml looks fine to me..

Basically everything works except adding a value to B1.

Sign In or Register to comment.