Cannot export to Excel/Word Table header in Custom temlpate
Posted: Fri Mar 24, 2023 6:02 pm
I have a Table using custom table header but when i export to word/excel, the custom header is not exported. (When choose export to Excel/Word The first row and third row of the header is not exported . But when export to PDF or Print easy it's exported OK). Please help to fix it.
This is my code:
In Custom template header:
<table cellspacing="0" class="table table-bordered table-sm ew-table">
<thead>
<tr class="ew-table-header">
<td colspan="3" style="text-align:center;"><b/>ABC</b></td>
<td style="text-align:center;"><b/>ZYZ</b></td>
<td colspan="5" style="text-align:center;"><b/>QKH</b></td>
<td></td>
</tr>
<tr class="ew-table-header">
<td>{{{id}}}</td>
<td>{{{tencanhancoquanchuyendon}}}</td>
<td>{{{tennguyendontructiepchuyendon}}}</td>
<td>{{{noidungdon}}}</td>
<td>{{{sophieuchuyen}}}</td>
<td>{{{soquyetdinhphancongxacminh}}}</td>
<td>{{{soquyetdinhgiaiquyetkhieunaitocao}}}</td>
<td>{{{quyetdinhdinhchigiaiquyetkhieunaitocao}}}</td>
<td>{{{thongbaobaocaoketquagiaiquyet}}}</td>
<td>{{{ghichu}}}</td>
</tr>
<tr>
<td>0</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>12</td>
</tr>
</thead>
<tbody>
In Custom Template Body:
<tr>
<td>{{{id}}}</td>
<td>{{{tencanhancoquanchuyendon}}}</td>
<td>{{{tennguyendontructiepchuyendon}}}</td>
<td>{{{noidungdon}}}</td>
<td>{{{sophieuchuyen}}}</td>
<!-- <td>{{{donvinhan}}}</td>-->
<td>{{{soquyetdinhphancongxacminh}}}</td>
<!-- <td>{{{tencanboduocphancongxacminh}}}</td>-->
<td>{{{soquyetdinhgiaiquyetkhieunaitocao}}}</td>
<!-- <td>{{{noidunggiaiquyetkhieunaitocao}}}</td>-->
<td>{{{quyetdinhdinhchigiaiquyetkhieunaitocao}}}</td>
<td>{{{thongbaobaocaoketquagiaiquyet}}}</td>
<td>{{{ghichu}}}</td>
</tr>
In Custom Template footer:
</tbody>
<!-- <tfoot><tr class="ew-table-footer">{{{list_options}}}<td>{{{MyField1}}}</td><td> </td></tr></tfoot> -->
</table>