EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
September 13, 2025, 02:26:06 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
Export to Excel the loaded data in datagrid
Pages: [
1
]
« previous
next »
Print
Author
Topic: Export to Excel the loaded data in datagrid (Read 11089 times)
kiran1234
Newbie
Posts: 2
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.
Logged
ehussain
Newbie
Posts: 16
Re: Export to Excel the loaded data in datagrid
«
Reply #1 on:
January 19, 2016, 04:22:44 AM »
try phpExcel
https://phpexcel.codeplex.com/wikipage?title=Examples&referringTitle=Home
I can help if you want to do phpExcel.
Ejaz
Logged
kiran1234
Newbie
Posts: 2
Re: Export to Excel the loaded data in datagrid
«
Reply #2 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++;
}
Logged
ehussain
Newbie
Posts: 16
Re: Export to Excel the loaded data in datagrid
«
Reply #3 on:
January 19, 2016, 02:14:52 PM »
$q = mysql_query("select * from mytable");
while($mrow = mysql_fetch_assoc($q)) {
$col = 0;
foreach($mrow as $key=>$value) {
$objPHPExcel->
setActiveSheetIndex(0)
->setCellValueByColumnAndRow($col, 0, $key);
$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $row + 1, $value);
$col++;
}
$row++;
}
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...