MYSTERY ZILLION တွင် English သို့မဟုတ် Unicode ဖြင့်သာ အသုံးပြုခွင့်ရှိသည်။ ဇော်ဂျီ ၊ ဧရာ စသည်တို့ကို အသုံးပြုခွင့် မရှိ။ Unicode fonts များမှာ Mon3,Yunghkio, Myanamr3 စသည်များ အသုံးပြုနိုင်သည်။ Unicode Guide ကို ဒီမှာ Download ချပါ။ Zawgyi to Unicode Converter
Don't share ebook or software if nobody request. You can find free book websites on here. We are welcome for discussion or asking question instead.

Exporting Data to Excel

array data value ကို excel file မှာ ထွက်ပြဖိို့အတွက် အောက်က code ရေးထားတာ error တက်နေလို့ ကူညီပေးကြပါဦးး

$array = array('T_002_001'=> $_POST['T_002_001'],
'T_002_002'=> $_POST['T_002_002'],
'T_002_003'=> $_POST['T_002_003'],
'T_002_004'=> $_POST['T_002_004'],
'T_002_005'=> $_POST['T_002_005'],
'T_002_006'=> $_POST['T_002_006'],
'T_002_007'=> $_POST['T_002_007'],
'T_002_008'=> $_POST['T_002_008'],
'T_002_009'=> $_POST['T_002_009'],
'T_002_010'=> $_POST['T_002_010']);
$_SESSION['result_array']= $array;

<? if (isset($_POST["CSV出力"])) { session_start(); if(($_SESSION['result_array'])){ $result_array = $_SESSION['result_array']; var_dump($result_array); $filename = "Sheet3_data" . date('Ymd') . ".csv"; str_replace(" ", "_", $result_array); header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: text/csv; charset=UTF-8"); ; $out = fopen("php://output", 'w'); $flag = false; function cleanData(&$str) { $str = preg_replace("/\t/", "\\t", $str); $str = preg_replace("/\r?\n/", "\\n", $str); if(strstr($str, '"')) $str = '"' . str_replace('"', '""', $str) . '"'; $str = mb_convert_encoding($str, 'UTF-16LE', 'UTF-8'); } foreach($result_array as $row) { //echo $row[0]; if(!$flag) { echo implode("\t", array_keys($row)) . "\r\n"; $flag = true; } //array_walk($row, 'cleanData'); echo implode("\t", array_values($row)) . "\r\n"; } exit; } } ?>


Sign In or Register to comment.