本文整理汇总了PHP中xlsWriteNumber函数的典型用法代码示例。如果您正苦于以下问题:PHP xlsWriteNumber函数的具体用法?PHP xlsWriteNumber怎么用?PHP xlsWriteNumber使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xlsWriteNumber函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: header
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=tx.xls ");
header("Content-Transfer-Encoding: binary ");
// 向表中添加数据
xlsBOF();
xlsWriteLabel(0, 0, "银行名称");
xlsWriteLabel(0, 1, "开户名");
xlsWriteLabel(0, 2, "银行卡号");
xlsWriteLabel(0, 3, "金额");
$xlsRow = 1;
while ($array = $db->fetch_array($query)) {
++$i;
xlsWriteNumber($xlsRow, 0, "{$i}");
xlsWriteNumber($xlsRow, 0, "{$array['0']}");
xlsWriteLabel($xlsRow, 1, "{$array['1']}");
xlsWriteLabel($xlsRow, 2, "{$array['2']}");
xlsWriteLabel($xlsRow, 3, "{$array['3']}");
$xlsRow++;
}
xlsEOF();
exit;
}
}
function xlsBOF()
{
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
return;
}
function xlsEOF()
开发者ID:soross,项目名称:myteashop,代码行数:31,代码来源:outExcel.php
示例2: xlsWriteLabel
xlsWriteLabel(0, 4, "DATE");
// -------- menampilkan data --------- //
// koneksi ke mysql
mysql_connect("localhost", "root", "");
mysql_select_db("sms");
$keyword = $_GET['keyword'];
// query menampilkan semua data
$query = "\nSELECT playsms_featureSurvey.keyword, \n playsms_tblSMSIncoming.in_sender, \n playsms_tblSMSIncoming.in_message, \n playsms_tblSMSIncoming.in_datetime\nFROM playsms_featureSurvey, playsms_tblSMSIncoming\nWHERE playsms_featureSurvey.keyword = playsms_tblSMSIncoming.in_keyword AND \n playsms_featureSurvey.keyword = '{$keyword}'\nORDER BY playsms_tblSMSIncoming.in_datetime DESC\n\n";
$hasil = mysql_query($query);
// nilai awal untuk baris cell
$noBarisCell = 1;
// nilai awal untuk nomor urut data
$noData = 1;
while ($data = mysql_fetch_array($hasil)) {
// menampilkan no. urut data
xlsWriteNumber($noBarisCell, 0, $noData);
// menampilkan data nim
xlsWriteLabel($noBarisCell, 1, $data['keyword']);
// menampilkan data nama mahasiswa
xlsWriteLabel($noBarisCell, 2, $data['in_sender']);
// menampilkan data nilai
xlsWriteLabel($noBarisCell, 3, $data['in_message']);
// menampilkan status kelulusan
xlsWriteLabel($noBarisCell, 4, $data['in_datetime']);
// increment untuk no. baris cell dan no. urut data
$noBarisCell++;
$noData++;
}
// memanggil function penanda akhir file excel
xlsEOF();
exit;
开发者ID:erdincay,项目名称:playSMS-extra-plugin,代码行数:31,代码来源:reportxls.php
示例3: xlsWriteNumber
//default safety
$stock_on_order = 0;
}*/
xlsWriteNumber($noBarisCell,0,$noData);
// menampilkan data nim
xlsWriteLabel($noBarisCell,1,$data['kd_barang']);
// menampilkan data nama mahasiswa
xlsWriteLabel($noBarisCell,2,$data['nama']);
// menampilkan data nilai
xlsWriteNumber($noBarisCell,3,$data['max_qty']);
xlsWriteNumber($noBarisCell,4,$data['stok']);
//xlsWriteNumber($noBarisCell,5,$stock_on_order);
xlsWriteNumber($noBarisCell,5,$data['order_qty']);
// menentukan status kelulusan
//if ($data['nilai'] >= 60) $status = "LULUS";
//else $status = "TIDAK LULUS";
// increment untuk no. baris cell dan no. urut data
$noBarisCell++;
$noData++;
}
// memanggil function penanda akhir file excel
xlsEOF();
exit();
?>
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:lap_order_qty.php
示例4: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "users.xls";
$judul = "users";
$tablehead = 2;
$tablebody = 3;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
xlsWriteLabel(0, 0, $judul);
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "no");
xlsWriteLabel($tablehead, $kolomhead++, "ip_address");
xlsWriteLabel($tablehead, $kolomhead++, "username");
xlsWriteLabel($tablehead, $kolomhead++, "password");
xlsWriteLabel($tablehead, $kolomhead++, "salt");
xlsWriteLabel($tablehead, $kolomhead++, "email");
xlsWriteLabel($tablehead, $kolomhead++, "activation_code");
xlsWriteLabel($tablehead, $kolomhead++, "forgotten_password_code");
xlsWriteLabel($tablehead, $kolomhead++, "forgotten_password_time");
xlsWriteLabel($tablehead, $kolomhead++, "remember_code");
xlsWriteLabel($tablehead, $kolomhead++, "created_on");
xlsWriteLabel($tablehead, $kolomhead++, "last_login");
xlsWriteLabel($tablehead, $kolomhead++, "active");
xlsWriteLabel($tablehead, $kolomhead++, "sex");
xlsWriteLabel($tablehead, $kolomhead++, "birth_date");
xlsWriteLabel($tablehead, $kolomhead++, "yxdm");
xlsWriteLabel($tablehead, $kolomhead++, "jszw");
xlsWriteLabel($tablehead, $kolomhead++, "jszc");
xlsWriteLabel($tablehead, $kolomhead++, "jsxl");
xlsWriteLabel($tablehead, $kolomhead++, "phone");
xlsWriteLabel($tablehead, $kolomhead++, "jsinfo");
foreach ($this->users_model->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->ip_address);
xlsWriteLabel($tablebody, $kolombody++, $data->username);
xlsWriteLabel($tablebody, $kolombody++, $data->password);
xlsWriteLabel($tablebody, $kolombody++, $data->salt);
xlsWriteLabel($tablebody, $kolombody++, $data->email);
xlsWriteLabel($tablebody, $kolombody++, $data->activation_code);
xlsWriteLabel($tablebody, $kolombody++, $data->forgotten_password_code);
xlsWriteNumber($tablebody, $kolombody++, $data->forgotten_password_time);
xlsWriteLabel($tablebody, $kolombody++, $data->remember_code);
xlsWriteNumber($tablebody, $kolombody++, $data->created_on);
xlsWriteNumber($tablebody, $kolombody++, $data->last_login);
xlsWriteLabel($tablebody, $kolombody++, $data->active);
xlsWriteLabel($tablebody, $kolombody++, $data->sex);
xlsWriteLabel($tablebody, $kolombody++, $data->birth_date);
xlsWriteLabel($tablebody, $kolombody++, $data->yxdm);
xlsWriteLabel($tablebody, $kolombody++, $data->jszw);
xlsWriteLabel($tablebody, $kolombody++, $data->jszc);
xlsWriteLabel($tablebody, $kolombody++, $data->jsxl);
xlsWriteNumber($tablebody, $kolombody++, $data->phone);
xlsWriteLabel($tablebody, $kolombody++, $data->jsinfo);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:super99199,项目名称:oasystem,代码行数:71,代码来源:Users.php
示例5: print_expenselist_excel
function print_expenselist_excel($array, $groupid)
{
// http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8
$members = get_groupmembers($groupid);
$mcount = count($members);
// construct array to hold all expense id's per member
for ($j = 0; $j < $mcount; $j++) {
$expids[$members[$j]['user_id']] = get_user_expenses_idonly($members[$j]['user_id']);
}
// Send Header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=test.xls ");
header("Content-Transfer-Encoding: binary ");
// XLS Data Cell
$result = mysql_db_query($dbname, "select id,prename,name,sname,grade from appdata where course='{$courseid}' and sec='{$section}'");
xlsBOF();
xlsWriteLabel(0, 0, "ID");
xlsWriteLabel(0, 1, "Date");
xlsWriteLabel(0, 2, "Type");
xlsWriteLabel(0, 3, "Description");
xlsWriteLabel(0, 4, "Amount");
xlsWriteLabel(0, 5, "Paid by");
for ($j = 0; $j < $mcount; $j++) {
if (!empty($members[$j]['username'])) {
$uname = " (" . $members[$j]['username'] . ")";
} else {
$uname = "";
}
xlsWriteLabel(0, 6 + $j, $members[$j]['realname'] . $uname);
}
$xlsRow = 1;
$count = count($array);
for ($i = 0; $i < $count; $i++) {
if (!empty($array[$i]['username'])) {
$uname = " (" . $array[$i]['username'] . ")";
} else {
$uname = "";
}
xlsWriteNumber($xlsRow, 0, $array[$i]['expense_id']);
xlsWriteLabel($xlsRow, 1, $array[$i]['date']);
xlsWriteLabel($xlsRow, 2, $array[$i]['type_name']);
xlsWriteLabel($xlsRow, 3, $array[$i]['description']);
xlsWriteNumber($xlsRow, 4, $array[$i]['amount']);
xlsWriteLabel($xlsRow, 5, $array[$i]['realname'] . $uname);
$x = 0;
for ($j = 0; $j < $mcount; $j++) {
// check number of participants for the expense
if (in_array($array[$i]['expense_id'], $expids[$members[$j]['user_id']])) {
$x += 1;
}
}
for ($j = 0; $j < $mcount; $j++) {
// write expense/person for each member
if (in_array($array[$i]['expense_id'], $expids[$members[$j]['user_id']])) {
xlsWriteNumber($xlsRow, 6 + $j, number_format($array[$i]['amount'] / $x, DECIMALS, DSEP, TSEP));
} else {
xlsWriteLabel($xlsRow, 6 + $j, "");
}
}
$xlsRow++;
}
xlsEOF();
exit;
}
开发者ID:Whiskey24,项目名称:GoingDutchApi,代码行数:69,代码来源:functions.php
示例6: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "facultad.xls";
$judul = "facultad";
$tablehead = 2;
$tablebody = 3;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
xlsWriteLabel(0, 0, $judul);
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "no");
xlsWriteLabel($tablehead, $kolomhead++, "NOMBRE_FACULTAD");
foreach ($this->model_facultad->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->NOMBRE_FACULTAD);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:actcux,项目名称:ProyectoNotasQr,代码行数:33,代码来源:Facultad.php
示例7: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "jadwal.xls";
$judul = "jadwal";
$tablehead = 0;
$tablebody = 1;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Id Tes");
xlsWriteLabel($tablehead, $kolomhead++, "Id Kelas");
xlsWriteLabel($tablehead, $kolomhead++, "Tgl Tes");
foreach ($this->Jadwal_model->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteNumber($tablebody, $kolombody++, $data->id_tes);
xlsWriteNumber($tablebody, $kolombody++, $data->id_kelas);
xlsWriteLabel($tablebody, $kolombody++, $data->tgl_tes);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:rezaple,项目名称:CI_Basecode,代码行数:36,代码来源:Jadwal.php
示例8: header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=hydrometrie.xls");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
//xlsWriteLabel(0,0,"List of car company.");
foreach ($header as $key => $val) {
xlsWriteLabel(0, $key, $val);
}
// Put data records from mysql by while loop.
$sql = "SELECT * FROM `hydrometrie`";
$data = exeuteMySQL($sql);
$xlsRow = 1;
foreach ($data as $key => $val) {
xlsWriteNumber($xlsRow, 0, $val[0]);
xlsWriteLabel($xlsRow, 1, $val[1]);
xlsWriteLabel($xlsRow, 2, $val[2]);
xlsWriteNumber($xlsRow, 3, $val[3]);
xlsWriteNumber($xlsRow, 4, $val[4]);
xlsWriteLabel($xlsRow, 5, $val[5]);
xlsWriteLabel($xlsRow, 6, $val[6]);
xlsWriteLabel($xlsRow, 7, $val[7]);
xlsWriteLabel($xlsRow, 8, $val[8]);
$xlsRow++;
}
xlsEOF();
exit;
开发者ID:benleibert,项目名称:channel-software,代码行数:31,代码来源:exportcommande.php
示例9: while
while ($data = mysql_fetch_array($hasil))
{
// menampilkan no. urut data
xlsWriteNumber($noBarisCell,0,$noData);
// menampilkan data nim
xlsWriteLabel($noBarisCell,1,$data['No_SPP']);
// menampilkan data nama mahasiswa
xlsWriteLabel($noBarisCell,2,$data['No_BPB']);
// menampilkan data nilai
xlsWriteLabel($noBarisCell,3,$data['No_BTB']);
xlsWriteLabel($noBarisCell,4,$data['Nm_Barang']);
xlsWriteNumber($noBarisCell,5,$data['Qty']);
xlsWriteNumber($noBarisCell,6,$data['Qty_diberi']);
xlsWriteLabel($noBarisCell,7,$data['jenis']);
// menentukan status kelulusan
//if ($data['nilai'] >= 60) $status = "LULUS";
//else $status = "TIDAK LULUS";
// menampilkan status kelulusan
/* xlsWriteNumber($noBarisCell,4,$data['harga_dosp']);
xlsWriteNumber($noBarisCell,5,$data['stok_ms']);
xlsWriteNumber($noBarisCell,6,$data['stok_apt']);
xlsWriteNumber($noBarisCell,7,$data['stok_rj']);
xlsWriteNumber($noBarisCell,8,$data['stok_ri']);
xlsWriteNumber($noBarisCell,9,$data['stok_igd']);
xlsWriteNumber($noBarisCell,10,$data['stok_oca']);
xlsWriteNumber($noBarisCell,11,$data['jumlah']);*/
// increment untuk no. baris cell dan no. urut data
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:lap_distribusi_pabrik.php
示例10: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "mahasiswa.xls";
$judul = "mahasiswa";
$tablehead = 0;
$tablebody = 1;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Nama");
xlsWriteLabel($tablehead, $kolomhead++, "Jenis Kelamin");
xlsWriteLabel($tablehead, $kolomhead++, "Id Agama");
xlsWriteLabel($tablehead, $kolomhead++, "Hoby");
xlsWriteLabel($tablehead, $kolomhead++, "Alamat");
xlsWriteLabel($tablehead, $kolomhead++, "Tanggal Lahir");
foreach ($this->Mahasiswa_model->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->nama);
xlsWriteLabel($tablebody, $kolombody++, $data->jenis_kelamin);
xlsWriteNumber($tablebody, $kolombody++, $data->id_agama);
xlsWriteLabel($tablebody, $kolombody++, $data->hoby);
xlsWriteLabel($tablebody, $kolombody++, $data->alamat);
xlsWriteLabel($tablebody, $kolombody++, $data->tanggal_lahir);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:nurisakbar,项目名称:racode,代码行数:42,代码来源:Mahasiswa.php
示例11: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "tbl_daftar_kkm.xls";
$judul = "tbl_daftar_kkm";
$tablehead = 0;
$tablebody = 1;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Nama");
xlsWriteLabel($tablehead, $kolomhead++, "Jenis Kelamin");
xlsWriteLabel($tablehead, $kolomhead++, "Tempat Tanggal Lahir");
xlsWriteLabel($tablehead, $kolomhead++, "Fakultas");
xlsWriteLabel($tablehead, $kolomhead++, "Jurusan");
xlsWriteLabel($tablehead, $kolomhead++, "Semester");
xlsWriteLabel($tablehead, $kolomhead++, "Alamat Asal");
xlsWriteLabel($tablehead, $kolomhead++, "Alamat Sekarang");
xlsWriteLabel($tablehead, $kolomhead++, "No Telp");
xlsWriteLabel($tablehead, $kolomhead++, "Keterangan Khusus");
xlsWriteLabel($tablehead, $kolomhead++, "Persyaratan");
xlsWriteLabel($tablehead, $kolomhead++, "Foto");
xlsWriteLabel($tablehead, $kolomhead++, "Id Kelompok");
xlsWriteLabel($tablehead, $kolomhead++, "Dpl");
xlsWriteLabel($tablehead, $kolomhead++, "Surat Keterangan Kuliah");
xlsWriteLabel($tablehead, $kolomhead++, "Bukti Lunas Spp");
xlsWriteLabel($tablehead, $kolomhead++, "Formulir Pendaftaran");
foreach ($this->Daftar_peserta_kkm->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->nama);
xlsWriteLabel($tablebody, $kolombody++, $data->jenis_kelamin);
xlsWriteLabel($tablebody, $kolombody++, $data->tempat_tanggal_lahir);
xlsWriteLabel($tablebody, $kolombody++, $data->fakultas);
xlsWriteLabel($tablebody, $kolombody++, $data->jurusan);
xlsWriteLabel($tablebody, $kolombody++, $data->semester);
xlsWriteLabel($tablebody, $kolombody++, $data->alamat_asal);
xlsWriteLabel($tablebody, $kolombody++, $data->alamat_sekarang);
xlsWriteLabel($tablebody, $kolombody++, $data->no_telp);
xlsWriteLabel($tablebody, $kolombody++, $data->keterangan_khusus);
xlsWriteLabel($tablebody, $kolombody++, $data->persyaratan);
xlsWriteLabel($tablebody, $kolombody++, $data->foto);
xlsWriteNumber($tablebody, $kolombody++, $data->id_kelompok);
xlsWriteLabel($tablebody, $kolombody++, $data->dpl);
xlsWriteLabel($tablebody, $kolombody++, $data->surat_keterangan_kuliah);
xlsWriteLabel($tablebody, $kolombody++, $data->bukti_lunas_spp);
xlsWriteLabel($tablebody, $kolombody++, $data->formulir_pendaftaran);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:Furiansyah,项目名称:lp2m_uinsgd_ac_id,代码行数:64,代码来源:daftar_peserta_kkm.php
示例12: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "notas.xls";
$judul = "notas";
$tablehead = 2;
$tablebody = 3;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
xlsWriteLabel(0, 0, $judul);
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "no");
xlsWriteLabel($tablehead, $kolomhead++, "CODIGO_NOTA");
xlsWriteLabel($tablehead, $kolomhead++, "CODIGO_ALUMNO");
xlsWriteLabel($tablehead, $kolomhead++, "CODIGO_ASIGNATURA");
xlsWriteLabel($tablehead, $kolomhead++, "PRIMER_PARCIAL");
xlsWriteLabel($tablehead, $kolomhead++, "SEGUNDA_PARCIAL");
xlsWriteLabel($tablehead, $kolomhead++, "NOTA_FINAL");
xlsWriteLabel($tablehead, $kolomhead++, "FECHA_ING_NOTAS");
xlsWriteLabel($tablehead, $kolomhead++, "SEMESTRE");
foreach ($this->model_notas->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteNumber($tablebody, $kolombody++, $data->CODIGO_NOTA);
xlsWriteLabel($tablebody, $kolombody++, $data->CODIGO_ALUMNO);
xlsWriteLabel($tablebody, $kolombody++, $data->CODIGO_ASIGNATURA);
xlsWriteNumber($tablebody, $kolombody++, $data->PRIMER_PARCIAL);
xlsWriteNumber($tablebody, $kolombody++, $data->SEGUNDA_PARCIAL);
xlsWriteNumber($tablebody, $kolombody++, $data->NOTA_FINAL);
xlsWriteNumber($tablebody, $kolombody++, $data->FECHA_ING_NOTAS);
xlsWriteLabel($tablebody, $kolombody++, $data->SEMESTRE);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:actcux,项目名称:ProyectoNotasQr,代码行数:47,代码来源:Notas.php
示例13: while
// nilai awal untuk nomor urut data
$noData = 1;
while ($data = mysql_fetch_array($hasil))
{
// menampilkan no. urut data
xlsWriteNumber($noBarisCell,0,$noData);
// menampilkan data nim
xlsWriteLabel($noBarisCell,1,$data['kd_barang']);
// menampilkan data nama mahasiswa
xlsWriteLabel($noBarisCell,2,$data['nama']);
// menampilkan data nilai
xlsWriteNumber($noBarisCell,3,$data['stok']);
// menentukan status kelulusan
//if ($data['nilai'] >= 60) $status = "LULUS";
//else $status = "TIDAK LULUS";
// menampilkan status kelulusan
xlsWriteLabel($noBarisCell,4,$data['expire_date']);
xlsWriteLabel($noBarisCell,5,$data['harga_dosp']);
// increment untuk no. baris cell dan no. urut data
$noBarisCell++;
$noData++;
}
// memanggil function penanda akhir file excel
xlsEOF();
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:lap_ms_barang_kadaluarsa.php
示例14: strlen
$L = strlen($Value);
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
echo $Value;
return;
}
// ----- end of function library -----
?>
//
// To display the contents directly in a MIME compatible browser
// add the following lines on TOP of your PHP file:
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D,d M YH:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header('Content-type: application/x-msexcel');
header("Content-Disposition: attachment; filename=EmplList.xls");
header("Content-Description: PHP/INTERBASE Generated Data");
//
// the next lines demonstrate the generation of the Excel stream
//
xlsBOF();
// begin Excel stream
xlsWriteLabel(0, 0, "This is a label");
// write a label in A1, use for dates too
xlsWriteNumber(0, 1, 9999);
// write a number B1
xlsEOF();
// close the stream
开发者ID:sarakm,项目名称:jjel,代码行数:31,代码来源:excel.php
示例15: xlsWriteLabel
xlsWriteLabel(0, 6, "Note");
xlsWriteLabel(0, 7, "Economico");
$xlsRow = 1;
$tot_economico = 0;
foreach ($r as $key => $field) {
if ($field['n_pdl'] > "1") {
$economico = floatval($field['econ']) * floatval($field['n_pdl']);
$compenso = floatval($field['prz']) * floatval($field['n_pdl']);
} else {
$economico = floatval($field['econ']);
$compenso = floatval($field['prz']);
}
xlsWriteLabel($xlsRow, 0, $field['n_call']);
xlsWriteLabel($xlsRow, 1, Inverti_Data($field['data_att']));
xlsWriteLabel($xlsRow, 2, $field['cliente']);
xlsWriteLabel($xlsRow, 3, $field['Comune'] . " (" . $field['Targa'] . ")");
xlsWriteLabel($xlsRow, 4, $field['tecnico']);
xlsWriteLabel($xlsRow, 5, $field['tipo']);
xlsWriteLabel($xlsRow, 6, $field['note_call']);
xlsWriteNumber($xlsRow, 7, sprintf("%.2f", $economico));
$tot_economico += $economico;
$xlsRow++;
}
xlsWriteLabel($xlsRow, 0, "Totale: ");
xlsWriteNumber($xlsRow, 1, sprintf("%.2f", $tot_economico));
xlsWriteLabel($xlsRow + 1, 0, "Aaaaaa: ");
xlsWriteNumber($xlsRow + 1, 1, "579,33");
xlsWriteLabel($xlsRow + 2, 0, "float con virgola: ");
xlsWriteNumber($xlsRow + 2, 1, sprintf("%,2f", $tot_economico));
xlsEOF();
exit;
开发者ID:clagiordano,项目名称:weblibs,代码行数:31,代码来源:xls4.php
示例16: while
while ($data = mysql_fetch_array($hasil))
{
// menampilkan no. urut data
xlsWriteNumber($noBarisCell,0,$noData);
// menampilkan data nim
xlsWriteLabel($noBarisCell,1,$data['barang_id']);
// menampilkan data nama mahasiswa
xlsWriteLabel($noBarisCell,2,$data['nama']);
// menampilkan data nilai
xlsWriteNumber($noBarisCell,3,$data['b_2']);
xlsWriteNumber($noBarisCell,4,$data['b_1']);
xlsWriteNumber($noBarisCell,5,$data['b1']);
xlsWriteNumber($noBarisCell,6,$data['rata_rata']);
// menentukan status kelulusan
//if ($data['nilai'] >= 60) $status = "LULUS";
//else $status = "TIDAK LULUS";
// increment untuk no. baris cell dan no. urut data
$noBarisCell++;
$noData++;
}
// memanggil function penanda akhir file excel
xlsEOF();
exit();
?>
开发者ID:reekoheek,项目名称:srmis,代码行数:31,代码来源:lap_amc.php
示例17: search_excel
//.........这里部分代码省略.........
# get the search details:
if (isset($VAR['search_id'])) {
include_once PATH_CORE . 'search.inc.php';
$search = new CORE_search();
$search->get($VAR['search_id']);
} else {
echo '<BR> The search terms submitted were invalid!';
}
# get the sort order details:
if (isset($VAR['order_by']) && $VAR['order_by'] != "") {
$order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $VAR['order_by'];
$smarty_order = $VAR['order_by'];
} else {
$order_by = ' ORDER BY ' . AGILE_DB_PREFIX . $construct->table . '.' . $construct->order_by;
$smarty_order = $search->order_by;
}
# determine the offset & limit
if (isset($VAR['page'])) {
$current_page = $VAR['page'];
} else {
$current_page = '0';
}
# determine the offset & limit
if ($current_page == 0) {
$offset = '0,10000000';
} else {
$offset = $current_page * $search->limit - $search->limit . ',' . $search->limit;
}
# format saved search string
$sql = explode(" WHERE ", $search->sql);
# generate the full query
$q = preg_replace("/%%fieldList%%/i", $field_list, $search->sql);
$q = preg_replace("/%%tableList%%/i", AGILE_DB_PREFIX . $construct->table, $q);
$q = preg_replace("/%%whereList%%/i", "", $q);
$q .= " " . AGILE_DB_PREFIX . $construct->table . ".site_id = '" . DEFAULT_SITE . "'";
$q .= $order_by;
$db =& DB();
# determine the offset & limit
$result = $db->Execute($q);
# error reporting
if ($result === false) {
global $C_debug;
$C_debug->error('core:export.inc.php', 'search_xml', $db->ErrorMsg() . '<br><br>' . $q);
echo "An SQL error has occured!";
return;
}
# put the results into an array
$i = 0;
$class_name = TRUE;
$results = '';
while (!$result->EOF) {
$results[$i] = $result->fields;
$result->MoveNext();
$i++;
}
# get any linked fields
if ($i > 0) {
$this->result = $results;
$db_join = new CORE_database();
$this->result = $db_join->join_fields($results, $this->linked);
} else {
$this->result = $results;
}
/************** END STANDARD EXPORT SEARCH CODE *********************/
# WRITE THE FIRST COLUMN
reset($arr);
$column = 0;
while (list($key, $value) = each($arr)) {
// get the translated field name
$field = $C_translate->translate('field_' . $value, $construct->module, '');
if (gettype($this->result["{$ii}"]["{$key}"]) != "string") {
xlsWriteLabel($row, $column, $field);
}
$column++;
}
# LOOP THROUGH THE RESULTS & DISPLAY AS EXCEL
$row = 1;
for ($ii = 0; $ii < count($this->result); $ii++) {
# get the data for each cell:
reset($arr);
$column = 0;
while (list($key, $value) = each($arr)) {
if ($construct->field["{$value}"][convert] == 'date' || $construct->field["{$value}"][convert] == 'time' || $construct->field["{$value}"][convert] == 'date-now' || $construct->field["{$value}"][convert] == 'date-time') {
$data = date(UNIX_DATE_FORMAT, $this->result["{$ii}"]["{$value}"]);
} else {
$data = $this->result["{$ii}"]["{$value}"];
}
if (is_numeric($data)) {
xlsWriteNumber($row, $column, $data);
} else {
xlsWriteLabel($row, $column, $data);
}
$column++;
}
$row++;
}
# Dispay the output
xlsEOF();
exit;
}
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:101,代码来源:export.inc.php
示例18: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "m_admin.xls";
$judul = "m_admin";
$tablehead = 0;
$tablebody = 1;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Username");
xlsWriteLabel($tablehead, $kolomhead++, "Password");
xlsWriteLabel($tablehead, $kolomhead++, "Level");
xlsWriteLabel($tablehead, $kolomhead++, "Kon Id");
foreach ($this->Admin_model->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->username);
xlsWriteLabel($tablebody, $kolombody++, $data->password);
xlsWriteLabel($tablebody, $kolombody++, $data->level);
xlsWriteNumber($tablebody, $kolombody++, $data->kon_id);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:nurisakbar,项目名称:racode,代码行数:38,代码来源:Admin.php
示例19: excel
public function excel()
{
$this->load->helper('exportexcel');
$namaFile = "tbl_kelompok.xls";
$judul = "tbl_kelompok";
$tablehead = 0;
$tablebody = 1;
$nourut = 1;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "No");
xlsWriteLabel($tablehead, $kolomhead++, "Nidn");
xlsWriteLabel($tablehead, $kolomhead++, "Dpl");
xlsWriteLabel($tablehead, $kolomhead++, "Lokasi");
xlsWriteLabel($tablehead, $kolomhead++, "Jumlah");
foreach ($this->Daftar_kelompok->get_all() as $data) {
$kolombody = 0;
//ubah xlsWriteLabel menjadi xlsWriteNumber untuk kolom numeric
xlsWriteNumber($tablebody, $kolombody++, $nourut);
xlsWriteLabel($tablebody, $kolombody++, $data->nidn);
xlsWriteLabel($tablebody, $kolombody++, $data->dpl);
xlsWriteLabel($tablebody, $kolombody++, $data->lokasi);
xlsWriteNumber($tablebody, $kolombody++, $data->jumlah);
$tablebody++;
$nourut++;
}
xlsEOF();
exit;
}
开发者ID:Furiansyah,项目名称:lp2m_uinsgd_ac_id,代码行数:38,代码来源:Daftar_kelompok.php
示例20: header
$tablehead = 1;
//baris berapa data mulai di tulis
$tablebody = 2;
//penulisan header
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Disposition: attachment;filename=" . $namaFile . "");
header("Content-Transfer-Encoding: binary ");
xlsBOF();
//xlsWriteLabel(0,0,$judul);
$kolomhead = 0;
xlsWriteLabel($tablehead, $kolomhead++, "ID");
xlsWriteLabel($tablehead, $kolomhead++, "NAK");
xlsWriteLabel($tablehead, $kolomhead++, "NAMA");
xlsWriteLabel($tablehead, $kolomhead++, "NIK");
while ($data = mysql_fetch_array($result)) {
$kolombody = 0;
//gunakan xlsWriteNumber untuk penulisan nomor dan xlsWriteLabel untuk penulisan string
xlsWriteNumber($tablebody, $kolombody++, $data['id']);
xlsWriteLabel($tablebody, $kolombody++, $data['nak']);
xlsWriteLabel($tablebody, $kolombody++, $data['nama']);
xlsWriteLabel($tablebody, $kolombody++, $data['nik']);
$tablebody++;
//$nourut++;
}
xlsEOF();
exit;
开发者ID:rifky1994,项目名称:registrasi,代码行数:31,代码来源:ekspor.php
注:本文中的xlsWriteNumber函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神 |
请发表评论