EasyUI Forum
September 13, 2025, 04:49:37 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / Re: Export to Excel the loaded data in datagrid on: January 19, 2016, 06:50:30 AM
Hi, I have configured with PHPExcel.

Its working well.  But I'm unable to get column names as header. Can u please help.

$q = mysql_query("select * from mytable");

while($mrow = mysql_fetch_assoc($q)) {
    $col = 0;
    foreach($mrow as $key=>$value) {
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, 0, $key);
        $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $row + 1, $value);
        $col++;
    }
    $row++;
 }

2  General Category / EasyUI for jQuery / Export to Excel the loaded data in datagrid on: January 19, 2016, 03:15:33 AM
I tried the topics posted in the forum, but non was helpful. Is there any other solution to export the data from datagrid with same format to excel. Please help. Need header and data. Thanks.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!