0

I've below html code of table exported from excel macro. Now I want to fix its headers while scrolling as there will be many rows in a table. Any way to do this.

I tried with position:fixed for rows but it just mess-up table layout.

Any help please.

https://jsfiddle.net/samadhan10/8ya5rg7k/

I tried solution from here but the cell alignment is messed-up.

https://jsfiddle.net/samadhan10/ogavsejm/1/

Experimenter
  • 167
  • 1
  • 14

1 Answers1

0

I solved it by exporting data and header rows separately in html pages. Then modified the file having header and added them in a fixed div:

<div  position="fixed">
...
</div>

Embedded data file using iframe:

<div>
   <iframe src="data.html" marginwidth="60" width="1244" height="1500" align="center"> 
   </iframe>
</div>
Experimenter
  • 167
  • 1
  • 14