ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: kiwon34 on August 12, 2020, 05:24:20 pm

Title: Give style when exporting to excel file.
Post by: kiwon34 on August 12, 2020, 05:24:20 pm
Hi,

I want to give border styles to excel cells when exporting.

https://stackblitz.com/edit/paramquery-demo-6cvpfg?file=index.js (https://stackblitz.com/edit/paramquery-demo-6cvpfg?file=index.js)
This is my example. I want to give styles when "worksheetReady()" is triggered, while not giving styles to the colModel, as in line 77.
I want to give border-bottom style to workbook.sheets[0].columns but it won't work. It only works when I give styles in colModel.
Is there a way to use worksheetReady to give specific cell styles?
Title: Re: Give style when exporting to excel file.
Post by: paramvir on August 12, 2020, 10:17:45 pm
Your approach is correct; that looks like a bug.

workaround is to define the borders in the order of left, right, top and bottom

Code: [Select]
     let _border ={left: '1px solid #00FF00',
               right: '1px solid #00FF00', 
               top: '1px solid #00FF00',
               bottom: '1px solid #00FF00'
     };

Working stackblitz: https://stackblitz.com/edit/paramquery-demo-59h3ag?file=index.js


As a side note, one() can be used instead of on() & off()