TableExport icon indicating copy to clipboard operation
TableExport copied to clipboard

Issue with a complex header

Open stla opened this issue 5 years ago • 3 comments

Hello,

I have such a header:

  <thead>
    <tr>
      <th colspan="2" rowspan="2">Factors</th>
      <th colspan="5">Estimated parameters</th>
    </tr>
    <tr>
      <th colspan="2">Linear regression</th>
      <th colspan="3">Quadratic regression</th>
    </tr>
    <tr>
      <th>A</th>
      <th>B</th>
      <th>C</th>
      <th>D</th>
      <th>E</th>
      <th>F</th>
      <th>G</th>
    </tr>
  </thead>

When I export to xlsx, Excel has to make a repair, and here is the result:

excel1

while it should be:

excel2

stla avatar Jan 22 '19 09:01 stla

When I look at the merges I have:

[{s:{r:0,c:0},e:{r:1,c:1}},{s:{r:0,c:2},e:{r:0,c:6}},{s:{r:1,c:1},e:{r:1,c:2}},{s:{r:1,c:3},e:{r:1,c:5}}]

It should be instead, I think:

[{s:{r:0,c:0},e:{r:1,c:1}},{s:{r:0,c:2},e:{r:0,c:6}},{s:{r:1,c:2},e:{r:1,c:3}},{s:{r:1,c:4},e:{r:1,c:6}}]

When I manually do the replacement, Excel (2016) still does a repair, but the repaired file is correct. And it is correct in LibreOffice, without repair.

stla avatar Jan 22 '19 14:01 stla

In my case : when i set header with rowspan and colspan, the header look like this image

My Expectation, the header look like this, image

Any one can help?

haifahrul avatar May 21 '19 16:05 haifahrul

In my case : when i set header with rowspan and colspan, the header look like this image

My Expectation, the header look like this, image

Any one can help?

I have investigation, and found :

If the header column set with text or value : text space number, the header exported to excel will be to formated with date. Ex. SEMESTER 4

  • SEMESTER is text
  • 4 is number

Is it a bug?

@clarketm @PeterDaveHello @janrop @tompetko @pierresh

haifahrul avatar May 21 '19 16:05 haifahrul