本文整理汇总了PHP中Excel_XML类的典型用法代码示例。如果您正苦于以下问题:PHP Excel_XML类的具体用法?PHP Excel_XML怎么用?PHP Excel_XML使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Excel_XML类的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");
}
示例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);
}
示例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'));
}
示例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());
}
示例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));
}
示例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;
}
示例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;
}
示例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'));
}
示例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'));
}
示例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'));
}
示例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");
}
示例12: export
public function export()
{
import("ORG.Io.Excel");
$map = array();
if ($_REQUEST['uname']) {
$map['m.user_name'] = array("like", urldecode($_REQUEST['uname']) . "%");
$search['uname'] = urldecode($_REQUEST['uname']);
}
if ($_REQUEST['realname']) {
$map['mi.real_name'] = urldecode($_REQUEST['realname']);
$search['realname'] = $map['mi.real_name'];
}
if (!empty($_REQUEST['bj']) && !empty($_REQUEST['lx']) && !empty($_REQUEST['money'])) {
$map[$_REQUEST['lx']] = array($_REQUEST['bj'], $_REQUEST['money']);
$search['bj'] = $_REQUEST['bj'];
$search['lx'] = $_REQUEST['lx'];
$search['money'] = $_REQUEST['money'];
}
if (session('admin_is_kf') == 1) {
$map['m.customer_id'] = session('admin_id');
}
$field = 'm.id,m.reg_time,m.user_name,mi.real_name,mm.money_freeze,mm.money_collect,mm.account_money';
$list = M('members m')->field($field)->join("{$this->pre}member_money mm ON mm.uid=m.id")->join("{$this->pre}member_info mi ON mi.uid=m.id")->where($map)->select();
$row = array();
$row[0] = array('序号', '用户ID', '用户名', '真实姓名', '总余额', '可用余额', '冻结金额', '待收金额', '注册时间');
$i = 1;
foreach ($list as $v) {
$row[$i]['i'] = $i;
$row[$i]['uid'] = $v['id'];
$row[$i]['card_num'] = $v['user_name'];
$row[$i]['card_pass'] = $v['real_name'];
$row[$i]['card_mianfei'] = $v['money_freeze'] + $v['account_money'] + $v['money_collect'];
$row[$i]['card_mianfei1'] = $v['account_money'];
$row[$i]['card_mianfei2'] = $v['money_freeze'];
$row[$i]['card_mianfei3'] = $v['money_collect'];
$row[$i]['card_timelimit'] = date("Y-m-d", $v['reg_time']);
$i++;
}
$xls = new Excel_XML('UTF-8', false, 'datalist');
$xls->addArray($row);
$xls->generateXML("memberlist");
}
示例13: 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");
}
示例14: 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");
}
示例15: dirname
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
// include the php-excel class
require dirname(__FILE__) . "/class-excel-xml.inc.php";
// create a dummy array
/*$doc = array (
1 => array ("Oliver", "Peter", "Paul"),
array ("Marlene", "Lucy", "Lina"),
array ("12", "012", "000"),
array ("12", "012", "000")
);*/
$doc[1][0] = "Oliver";
$doc[1][1] = "Peter";
$doc[1][2] = "Paul";
$doc[2][0] = "14";
$doc[2][1] = "05";
$doc[2][2] = "00";
$doc[3][0] = "14";
$doc[3][1] = "05";
$doc[3][2] = "00";
// generate excel file
$xls = new Excel_XML();
$xls->addArray($doc);
$xls->generateXML("mytest");