当前位置: 首页>>代码示例>>PHP>>正文


PHP Excel_XML::addArray方法代码示例

本文整理汇总了PHP中Excel_XML::addArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Excel_XML::addArray方法的具体用法?PHP Excel_XML::addArray怎么用?PHP Excel_XML::addArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Excel_XML的用法示例。


在下文中一共展示了Excel_XML::addArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: export

 public function export()
 {
     import("ORG.Io.Excel");
     alogs("DaystockAction", 0, 1, '执行了所有天天盈交易中导出导出操作!');
     //管理员操作日志
     $map['s.type_id'] = 1;
     $map['s.status'] = array("in", "2,6");
     $list = M("shares_apply s")->field("s.*,m.user_phone")->join("lzh_members m ON m.id = s.uid")->where($map)->select();
     $row = array();
     $row[0] = array("ID", "用户名", "本金", "管理费", "所获配资金额", "订单号", "平仓线", "警戒线", "添加时间", "期限");
     $i = 1;
     foreach ($list as $key => $v) {
         $row[$i]['id'] = $v['id'];
         $row[$i]['u_name'] = $v['u_name'];
         $row[$i]['principal'] = $v['principal'];
         $row[$i]['manage_fee'] = $v['manage_fee'];
         $row[$i]['shares_money'] = $v['shares_money'];
         $row[$i]['order'] = $v['order'];
         $row[$i]['open'] = $v['open'];
         $row[$i]['alert'] = $v['alert'];
         $row[$i]['add_time'] = date("Y-m-d", $v['add_time']);
         $row[$i]['duration'] = $v['duration'];
         $row[$i]['user_phone'] = $v['user_phone'];
         $i++;
     }
     $xls = new Excel_XML('UTF-8', false, 'datalist');
     $xls->addArray($row);
     $xls->generateXML("datalistcard");
 }
开发者ID:caotieshuan,项目名称:ishoutou,代码行数:29,代码来源:DaystockAction.class.php

示例2: excel_create

function excel_create($data, $filename = '', $stream = TRUE)
{
    require_once "excel/class-excel-xml.inc.php";
    $excel = new Excel_XML();
    $excel->addArray($data);
    $excel->generateXML($filename);
}
开发者ID:billystalnaker,项目名称:emails,代码行数:7,代码来源:excel_helper.php

示例3: export_excel

function export_excel($data, $title)
{
    require_once 'export_excel/php-excel.class.php';
    $xls = new Excel_XML('UTF-8', true, 'Sheet1');
    $xls->addArray($data);
    $xls->generateXML($title . date('Ymd'));
}
开发者ID:hieunhan1,项目名称:all-website3,代码行数:7,代码来源:home.php

示例4: get_transactions

 public function get_transactions()
 {
     $this->load->helper('php-excel');
     $ins_status = $this->transaction_models->get_Transactions();
     $data_array[] = array("Transaction Id", "Deal Tag", "User id", "User Name", "Done On", "E-Mail", "Gross Amount", "Payment Status");
     foreach ($ins_status as $list) {
         $data_array[] = array($list->txn_id, $list->deal_tag, $list->login_id, ucwords($list->first_name) . ' ' . ucwords($list->lastname), date("d-m-Y H:i:s", strtotime($list->payment_date)), $list->login_email, $list->gross_amt, $list->payment_status);
     }
     $xls = new Excel_XML();
     $xls->addArray($data_array);
     $xls->generateXML(time());
 }
开发者ID:Anuragigts,项目名称:igts_classified,代码行数:12,代码来源:Reports.php

示例5: export

 /**
  * 导出名单
  */
 public function export()
 {
     $activeid = intval($_GET['activeid']);
     $data[0] = array('姓名', '手机', '邮箱', '报名时间');
     $members = $this->t('activedata')->where(array('activeid' => $activeid))->select();
     foreach ($members as $k => $member) {
         $data[] = array($member['username'], $member['mobile'], $member['email'], formatTime($member['dateline'], 'Y-m-d H:i:s'));
     }
     //printr($data);exit();
     include ROOT_PATH . '/core/library/class.php_excel.php';
     $xls = new Excel_XML();
     $xls->addArray($data);
     $xls->generateXML(random(10));
 }
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:17,代码来源:class.ActiveController.php

示例6: export

 public function export()
 {
     if ($this->data['users']->role != "admin") {
         exit;
     }
     $data = array(1 => array('Full Name', 'User Name', 'E-mail', 'Gender', 'Address', 'Phone No', 'Mobile No', 'birthday', 'password', 'activated'));
     $student = User::where('role', 'teacher')->get();
     foreach ($student as $value) {
         $data[] = array($value->fullName, $value->username, $value->email, $value->gender, $value->address, $value->phoneNo, $value->mobileNo, $value->birthday, "", $value->activated);
     }
     $xls = new Excel_XML('UTF-8', false, 'Teachers Sheet');
     $xls->addArray($data);
     $xls->generateXML('Teachers-Sheet');
     exit;
 }
开发者ID:schoex,项目名称:Campusmate,代码行数:15,代码来源:TeachersController.php

示例7: export

 public function export()
 {
     if ($this->data['users']->role != "admin") {
         exit;
     }
     $classArray = array();
     $classes = classes::get();
     foreach ($classes as $class) {
         $classArray[$class->id] = $class->className;
     }
     $data = array(1 => array('Roll', 'Full Name', 'User Name', 'E-mail', 'Gender', 'Address', 'Phone No', 'Mobile No', 'Class', 'password', 'activated', 'birthday', 'Class ID'));
     $student = User::where('role', 'student')->get();
     foreach ($student as $value) {
         $data[] = array($value->studentRollId, $value->fullName, $value->username, $value->email, $value->gender, $value->address, $value->phoneNo, $value->mobileNo, isset($classArray[$value->studentClass]) ? $classArray[$value->studentClass] : "", $value->password, $value->activated, $value->birthday, $value->studentClass);
     }
     $xls = new Excel_XML('UTF-8', false, 'Payments Sheet');
     $xls->addArray($data);
     $xls->generateXML('Students Sheet');
     exit;
 }
开发者ID:schoex,项目名称:Campusmate,代码行数:20,代码来源:UsersController.php

示例8: export

 public function export()
 {
     $this->load->model('sale/return');
     $returns = array();
     $data = array();
     $results = $this->model_sale_return->getReturns($data);
     foreach ($results as $result) {
         $returns[] = array('return_id' => $result['return_id'], 'order_id' => $result['order_id'], 'customer' => $result['customer'], 'product' => $result['product'], 'model' => $result['model'], 'status' => $result['status'], 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'selected' => isset($this->request->post['selected']) && in_array($result['return_id'], $this->request->post['selected']));
     }
     $returns_data = array();
     $returns_column = array();
     $returns_column = array('Return ID', 'Order ID', 'Customer', 'Product', 'Model', 'Date Added', 'Date Modified');
     $returns_data[0] = $returns_column;
     foreach ($returns as $returns_row) {
         $returns_data[] = $returns_row;
     }
     require_once DIR_SYSTEM . 'library/excel_xml.php';
     $xls = new Excel_XML('UTF-8', false, 'Product Returns List');
     $xls->addArray($returns_data);
     $xls->generateXML('product_returns_list_' . date('Y-m-d _ H:i:s'));
 }
开发者ID:blogfor,项目名称:pci,代码行数:21,代码来源:vq2-admin_controller_sale_return.php

示例9: export

 public function export()
 {
     $this->load->model('report/return');
     $returns = array();
     $data = array();
     $results = $this->model_report_return->getReturns($data);
     foreach ($results as $result) {
         $returns[] = array('date_start' => date($this->language->get('date_format_short'), strtotime($result['date_start'])), 'date_end' => date($this->language->get('date_format_short'), strtotime($result['date_end'])), 'returns' => $result['returns']);
     }
     $returns_data = array();
     $returns_column = array();
     $returns_column = array('Start Date', 'End Date', 'No. Returns');
     $returns_data[0] = $returns_column;
     foreach ($returns as $returns_row) {
         $returns_data[] = $returns_row;
     }
     require_once DIR_SYSTEM . 'library/excel_xml.php';
     $xls = new Excel_XML('UTF-8', false, 'Sales Returns Report');
     $xls->addArray($returns_data);
     $xls->generateXML('sales_returns_report_' . date('Y-m-d _ H:i:s'));
 }
开发者ID:blogfor,项目名称:pci,代码行数:21,代码来源:vq2-admin_controller_report_sale_return.php

示例10: export

 public function export()
 {
     $this->load->model('report/sale');
     $orders = array();
     $data = array();
     $results = $this->model_report_sale->getShipping($data);
     foreach ($results as $result) {
         $orders[] = array('date_start' => date($this->language->get('date_format_short'), strtotime($result['date_start'])), 'date_end' => date($this->language->get('date_format_short'), strtotime($result['date_end'])), 'title' => $result['title'], 'orders' => $result['orders'], 'total' => $this->currency->format($result['total'], $this->config->get('config_currency')));
     }
     $orders_data = array();
     $orders_column = array();
     $orders_column = array('Start Date', 'End Date', 'Shipping Title', 'No. Orders', 'Total');
     $orders_data[0] = $orders_column;
     foreach ($orders as $orders_row) {
         $orders_data[] = $orders_row;
     }
     require_once DIR_SYSTEM . 'library/excel_xml.php';
     $xls = new Excel_XML('UTF-8', false, 'Sales Shipping Report');
     $xls->addArray($orders_data);
     $xls->generateXML('sales_shipping_report_' . date('Y-m-d _ H:i:s'));
 }
开发者ID:blogfor,项目名称:pci,代码行数:21,代码来源:vq2-admin_controller_report_sale_shipping.php

示例11: export

 public function export()
 {
     import("ORG.Io.Excel");
     $map = array();
     $map['uid'] = $this->uid;
     if ($_GET['start_time'] && $_GET['end_time']) {
         $_GET['start_time'] = strtotime($_GET['start_time'] . " 00:00:00");
         $_GET['end_time'] = strtotime($_GET['end_time'] . " 23:59:59");
         if ($_GET['start_time'] < $_GET['end_time']) {
             $map['add_time'] = array("between", "{$_GET['start_time']},{$_GET['end_time']}");
             $search['start_time'] = $_GET['start_time'];
             $search['end_time'] = $_GET['end_time'];
         }
     }
     if (!empty($_GET['log_type'])) {
         $map['type'] = intval($_GET['log_type']);
         $search['log_type'] = intval($_GET['log_type']);
     }
     $list = getMoneyLog($map, 100000);
     $logtype = C('MONEY_LOG');
     $row = array();
     $row[0] = array('序号', '发生日期', '类型', '影响金额', '可用余额', '冻结金额', '待收金额', '说明');
     $i = 1;
     foreach ($list['list'] as $v) {
         $row[$i]['i'] = $i;
         $row[$i]['uid'] = date("Y-m-d H:i:s", $v['add_time']);
         $row[$i]['card_num'] = $v['type'];
         $row[$i]['card_pass'] = $v['affect_money'];
         $row[$i]['card_mianfei'] = $v['account_money'];
         $row[$i]['card_mianfei0'] = $v['freeze_money'];
         $row[$i]['card_mianfei1'] = $v['collect_money'];
         $row[$i]['card_mianfei2'] = $v['info'];
         $i++;
     }
     $xls = new Excel_XML('UTF-8', false, 'moneyLog');
     $xls->addArray($row);
     $xls->generateXML("moneyLog");
 }
开发者ID:hutao1004,项目名称:yintt,代码行数:38,代码来源:CapitalAction.class.php

示例12: trasaction_reportsEXL

 public function trasaction_reportsEXL()
 {
     $this->load->helper('php-excel');
     $gefr = $this->uri->segment(3);
     $geto = $this->uri->segment(4);
     $val = $this->uri->segment(5);
     $data['users'] = $this->report_model->trasaction_reports($gefr, $geto, $val);
     $data['profile'] = $this->report_model->profile($val);
     $data_array[] = array("Done By", "Track Number", "Amount", "Type", "Balance", "Date & Time", "Remarks");
     foreach ($data['users'] as $row) {
         if ($row->type == 1) {
             $val = "Credited";
         } else {
             if ($row->type == 2) {
                 $val = "Debited";
             } else {
                 $val = "N/A";
             }
         }
         $data_array[] = array($data['profile']->first_name . ' ' . $data['profile']->last_name, "SCT-0" . $row->trans_id, $row->trans_amt, $val, $row->cur_amount, $row->trans_date, $row->trans_remark);
     }
     $xls = new Excel_XML();
     $xls->addArray($data_array);
     $xls->generateXML("trasactionDetails");
 }
开发者ID:Anuragigts,项目名称:dev_igts_2707,代码行数:25,代码来源:reports.php

示例13: excel

 public function excel()
 {
     Vendor('Excel.php-excel');
     $map['id'] = array('in', $_REQUEST['id']);
     $orders = $this->dao->where($map)->select();
     $xls = array();
     $xls[0][0] = "编号";
     $xls[0][1] = "金额";
     $xls[0][2] = "运输方式";
     $xls[0][3] = "运费";
     $xls[0][4] = "手续费";
     $xls[0][5] = "保险金";
     $xls[0][6] = "付款方式";
     $xls[0][7] = "购买时间";
     $xls[0][8] = "附加留言";
     $xls[0][9] = "IP地址";
     $xls[0][10] = "邮箱";
     $xls[0][11] = "姓";
     $xls[0][12] = "名";
     $xls[0][13] = "地址";
     $xls[0][14] = "电话";
     $xls[0][15] = "邮编";
     $xls[0][16] = "城市";
     $xls[0][17] = "省份";
     $xls[0][18] = "国家";
     $xls[0][19] = "订单状态";
     $xls[0][20] = "快递方式";
     $xls[0][21] = "重量";
     $i = 1;
     foreach ($orders as $o) {
         $xls[$i][0] = $o['sn'];
         $xls[$i][1] = $o['orders_total'];
         $xls[$i][2] = $o['shipping_method'];
         $xls[$i][3] = $o['shippingmoney'];
         $xls[$i][4] = $o['paymoney'];
         $xls[$i][5] = $o['insurance'];
         $xls[$i][6] = $o['payment_module_code'];
         $xls[$i][7] = toDate($o['dateline']);
         $xls[$i][8] = $o['BuyNote'];
         $xls[$i][9] = $o['ip_address'] . "(" . get_ip_area($o['ip_address']) . ")";
         $xls[$i][10] = $o['delivery_email'];
         $xls[$i][11] = $o['delivery_firstname'];
         $xls[$i][12] = $o['delivery_lastname'];
         $xls[$i][13] = $o['delivery_address'];
         $xls[$i][14] = $o['delivery_telephone'];
         $xls[$i][15] = $o['delivery_zip'];
         $xls[$i][16] = $o['delivery_city'];
         $xls[$i][17] = $o['delivery_state'];
         $xls[$i][18] = $o['delivery_country'];
         $xls[$i][19] = L('orders_status_' . $o['orders_status']);
         $xls[$i][20] = $o['shipping_method'];
         $xls[$i][21] = $o['total_weight'];
         $i++;
     }
     $xls_obj = new Excel_XML('UTF-8', false, 'SOP订单列表');
     $xls_obj->addArray($xls);
     $xls_obj->generateXML("SOP");
 }
开发者ID:anshidai,项目名称:bagsloves,代码行数:58,代码来源:OrdersAction.class.php

示例14:

<?php

/**
 * @file views-export-xls-view-xls.tpl.php
 * Template to display a view as an xls file.
 *
 * - $title : The title of this group of rows.  May be empty.
 * - $rows: An array of row items. Each row is an array of content
 *   keyed by field ID.
 * - $header: an array of haeaders(labels) for fields.
 * - $themed_rows: a array of rows with themed fields.
 * @ingroup views_templates
 */

  $path = drupal_get_path('module', 'views_export_xls');

  if (!isset($filename) || empty($filename)) {
    $filename = $view->name . '.xls';
  }

  // include xls generatator class
  require_once './' . $path . '/libs/php-excel.class.php';

  $xls = new Excel_XML('UTF-8', false, $view->name);
  $themed_rows = array_merge(array($header), $themed_rows);
  $xls->addArray($themed_rows);
  $xls->generateXML($file_name, true);
开发者ID:nickvanboven,项目名称:sociaalswv,代码行数:27,代码来源:views-export-xls-view-xls.tpl.php

示例15: array

 function generate_xls()
 {
     $this->load->helper('php-excel');
     $this->db->group_by(array('status_cat1', 'in_cid'));
     $query = $this->db->get('client');
     $fields = $field_array[] = array("Client ID", "Name", "Fathers Name", "Gender", "DOB", "Company Name", "Company Start Date", "Legal Structure", "Business Category", "Registration No.", "Email ID", "Office Address", "District", "State", "PIN", "Residence Address", "District", "State", "PIN", "Phone Numbers", "Personnel PAN", "Company PAN", "Digital auth name", "Digital Auth Expiry Date", "IT Username", "IT Password", "Sales Tax Username", "Sales Tax Password", "Team assigned", "Status of filling", "Last date of Visit", "Bank Name", "Account No", "MICR Code", "IFSC Code", "Branch Name", "DSC Index No.", "Signing Authority PAN", "Signing Authority's Father Name", "Carry Forward Lossess Details", "Last year of Filling", "VAT Audit Applicable");
     foreach ($query->result() as $row) {
         $data_array[] = array($row->status_cat1[0] . $row->in_cid, $row->name, $row->fatname, $this->getGender($row->sex), $row->dob, $row->cmpname, $row->cmpdob, $row->status_cat1, $row->bus_cat2, $row->regno, $row->email, $row->addr1_gn, $row->addr1_ds, $row->addr1_st, $row->addr1_pin, $row->addr2_gn, $row->addr2_ds, $row->addr2_st, $row->addr2_pin, $row->phnos, $row->pan, $row->cmppan, $row->da_name, $row->da_exp, $row->it_uname, $row->it_pass, $row->st_uname, $row->st_pass, $row->tid, $this->yesNo($row->stat_filing), $row->lvdate, $row->bank_name, $row->acno, $row->micr, $row->ifsc, $row->branch, $row->dscindex, $row->signingauth_pan, $row->signingauth_fat_name, $row->carry_fwd_losses, $row->last_year_of_filing, $this->yesNo($row->vat_audit_applicable));
     }
     $xls = new Excel_XML();
     $xls->addArray($field_array);
     if (isset($data_array)) {
         $xls->addArray($data_array);
     }
     $xls->generateXML("client_list");
 }
开发者ID:prasanthxyz,项目名称:ca,代码行数:16,代码来源:admin.php


注:本文中的Excel_XML::addArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。