excel-export icon indicating copy to clipboard operation
excel-export copied to clipboard

styling not working

Open johnvlittle opened this issue 9 years ago • 1 comments

Hi, we love excel export, but we cant get any styling to work.

We use a template. In the template we added background colours, big fonts etc to various cells. What we see is that the cells that are written, either using putCellValue, or add(a,b), just simply overwrite the templates style with a blank style

e.g.

        xlsxExporter = new WebXlsxExporter(servletContext.getRealPath("/reporting/report_template.xlsx")).with {
            fillHeader(headersList)
            add(exports, headersList)
            save(outputStream)
        }

In this we see that the cells containing header and row data have no styling, but the cells which were not written (e..g if we add backgroud colour to more columns than the data), still retain their styling.

I dont know if its a bug or we are doing it wrong, but neither explicitly setting a cell style, nor importing a pre-styled template, works.

we tried both WebXlsxExporter and XlsxExporter

E.g. if we want the headers to have a blue background, it does not seem possible using templates, so what is the point of templates?

Any ideas?

johnvlittle avatar Jun 04 '15 22:06 johnvlittle

Hi @johnvlittle,

Did you figure out how to fix this issue?

S.

sebDK avatar Sep 22 '16 07:09 sebDK