This article mainly introduces the simple implementation method of Phpexcel frozen (locked) table header, involving the use of Phpexcel for tabular properties of simple operation skills, very simple and practical, the need for friends can refer to the following
In this paper, a simple implementation method of Phpexcel frozen (locked) table header is described. Share to everyone for your reference, as follows:
Phpexcel is a powerful operation of the Microsoft Excel PHP plug-in, when exporting data for ease of viewing, sometimes need to lock the table header, that is, when scrolling through the data, the header always appears in the field of view, and does not disappear.
The calling method is as follows:
$objPHPExcel = new Phpexcel (); $objPHPExcel->setactivesheetindex (0); $objPHPExcel->getactivesheet () Freezepane (' A2 ');
The above code is to freeze the first row of the table, you may have some doubts about this method, why this is to freeze the first row, the following diagram explains the principle
The picture is ugly, everyone can read it.