DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Import/Export Tools  
DwZone Forum Index -> Import/Export Tools

Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 41 to 50 of 382 (Total: 233) First |  Prev |  Next |  Last  
 Subject Author Date  
   Error in asp Import/Export tool  
View this persons public profile  DanielBarrios   18:22 17 May 2013  
   Re: Error in asp Import/Export tool  
View this persons public profile  Gianluigi   0:04 19 May 2013  
   fopen error - import CSV  
View this persons public profile  Paul   8:31 8 May 2013  
   Re: fopen error - import CSV  
View this persons public profile  Gianluigi   8:44 8 May 2013  
   Re: fopen error - import CSV  
View this persons public profile  Paul   9:07 8 May 2013  
   Re: fopen error - import CSV  
View this persons public profile  Gianluigi   9:49 8 May 2013  
   export records - dynamic file name  
View this persons public profile  Paul   12:14 13 Mar 2013  
   Re: export records - dynamic file name  
View this persons public profile  Paul   12:19 13 Mar 2013  
    Warnings with Excel export  
View this persons public profile  Paul   10:36 13 Mar 2013  
 
I am having problem getting the Excel export to work. I am adding the extension using the defaults. I am getting a screen display with warning messages (below) and a facsimile of a spreadsheet table displayed on the browser screen.

Warning: Cannot modify header information - headers already sent by (output started at G:\vhosts\cpdvd\dwzExport\ExcelExport.php:412) in G:\vhosts\cpdvd\dwzExport\ExcelExport.php on line 277

Warning: Cannot modify header information - headers already sent by (output started at G:\vhosts\cpdvd\dwzExport\ExcelExport.php:412) in G:\vhosts\cpdvd\dwzExport\ExcelExport.php on line 278

Warning: Cannot modify header information - headers already sent by (output started at G:\vhosts\cpdvd\dwzExport\ExcelExport.php:412) in G:\vhosts\cpdvd\dwzExport\ExcelExport.php on line 279
username password family_id block_access last_name first_name address1 address2 city state zip home_phone cell_phone work_phone email birthday groups interests comments
adolphson 17233ado 17233 n Adolphson Jeff, Kim 26020 Co 4 Park Rapids MN 56470
ahrendt 17234ahr 17234 n Ahrendt Norman , Jean 314 Birch Briar Lane Park Rapids MN 56470


PAGE CODE BELOW:


<?php if (!isset($_SESSION)){ session_start(); } ?>
<?php
//*************
// Excel Writer
//*************
require_once("../dwzExport/ExcelExport.php");
?>
<?php require_once('../Connections/cpDVD.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$groupID_member_export = "-1";
if (isset($_SESSION['group_id'])) {
$groupID_member_export = $_SESSION['group_id'];
}
mysql_select_db($database_cpDVD, $cpDVD);
$query_member_export = sprintf("SELECT members.username, members.password, members.family_id, members.block_access, members.last_name, members.first_name, members.address1, members.address2, members.city, members.`state`, members.zip, members.home_phone, members.cell_phone, members.work_phone, members.email, members.birthday, members.groups, members.interests, members.comments FROM members WHERE members.group_id=%s ORDER BY members.last_name, members.first_name", GetSQLValueString($groupID_member_export, "int"));
$member_export = mysql_query($query_member_export, $cpDVD) or die(mysql_error());
$row_member_export = mysql_fetch_assoc($member_export);
$totalRows_member_export = mysql_num_rows($member_export);
?>
<?php
//************************************
// http://www.DwZone-it.com
// Import Export Tools - Excel Writer
// Version 1.2.2
//************************************
$dwzExcel_member_export = new dwzExcelExport();
$dwzExcel_member_export->Init();
$dwzExcel_member_export->SetFileName("Export.xls");
$dwzExcel_member_export->SetNumberOfRecord("ALL");
$dwzExcel_member_export->SetStartOn("ONLOAD", "");
$dwzExcel_member_export->SetStringApex("false");
$dwzExcel_member_export->SetFieldLabel("true");
$dwzExcel_member_export->SetRecordset($member_export);
$dwzExcel_member_export->addItem("username", "username", "String");
$dwzExcel_member_export->addItem("password", "password", "String");
$dwzExcel_member_export->addItem("family_id", "family_id", "String");
$dwzExcel_member_export->addItem("block_access", "block_access", "String");
$dwzExcel_member_export->addItem("last_name", "last_name", "String");
$dwzExcel_member_export->addItem("first_name", "first_name", "String");
$dwzExcel_member_export->addItem("address1", "address1", "String");
$dwzExcel_member_export->addItem("address2", "address2", "String");
$dwzExcel_member_export->addItem("city", "city", "String");
$dwzExcel_member_export->addItem("state", "state", "String");
$dwzExcel_member_export->addItem("zip", "zip", "String");
$dwzExcel_member_export->addItem("home_phone", "home_phone", "String");
$dwzExcel_member_export->addItem("cell_phone", "cell_phone", "String");
$dwzExcel_member_export->addItem("work_phone", "work_phone", "String");
$dwzExcel_member_export->addItem("email", "email", "String");
$dwzExcel_member_export->addItem("birthday", "birthday", "String");
$dwzExcel_member_export->addItem("groups", "groups", "String");
$dwzExcel_member_export->addItem("interests", "interests", "String");
$dwzExcel_member_export->addItem("comments", "comments", "String");
$dwzExcel_member_export->Execute();
//***********************
// Excel Writer
//***********************
?>
<?php
mysql_free_result($member_export);
?>

 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: Warnings with Excel export  
View this persons public profile  Gianluigi   10:41 13 Mar 2013  
Last Visit: Saturday 19 Apr, 2025 0:59 pm First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-2

Jump to: