PHP generated Excel Spreadsheets

PHP generated Excel Spreadsheets

am 22.05.2007 10:47:35 von Dale Attree

------=_NextPart_000_0060_01C79C5E.9BF23870
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Using PEAR :: Spreadsheet_Excel_Writer



I am having compatibility issues with Excel 2007.



Has anyone else experienced issues and got solutions?



________________________

Dale Attree

PHP Developer

Jacklin Enterprises

tel: +27 11 265 4282

mobile: +27 83 407 2911
fax: +27 11 314 2984







************************************************************ ***********************************
The information contained in this e-mail is confidential and may be subject to legal privilege.
Access to this e-mail by anyone other than the intended recipient is unauthorised.

If you are not the intended recipient you must not use, copy, distribute or disclose the e-mail or any part of its contents or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27 11 265 4200).
This message is free of all known viruses. It has been screened for viruses by Blockmail.
************************************************************ ***********************************


------=_NextPart_000_0060_01C79C5E.9BF23870--

Re: PHP generated Excel Spreadsheets

am 22.05.2007 12:16:18 von bedul

nope.. there were something strange with those excel 2007..
but i always use csv instead excel 2007.. well.. can u share us your script
related to above?
----- Original Message -----
From: "Dale Attree"
To:
Sent: Tuesday, May 22, 2007 3:47 PM
Subject: [PHP-WIN] PHP generated Excel Spreadsheets


> Using PEAR :: Spreadsheet_Excel_Writer
>
>
>
> I am having compatibility issues with Excel 2007.
>
>
>
> Has anyone else experienced issues and got solutions?
>
>
>
> ________________________
>
> Dale Attree
>
> PHP Developer
>
> Jacklin Enterprises
>
> tel: +27 11 265 4282
>
> mobile: +27 83 407 2911
> fax: +27 11 314 2984
>
>
>
>
>
>
>
>
************************************************************ ****************
*******************
> The information contained in this e-mail is confidential and may be
subject to legal privilege.
> Access to this e-mail by anyone other than the intended recipient is
unauthorised.
>
> If you are not the intended recipient you must not use, copy, distribute
or disclose the e-mail or any part of its contents or take any action in
reliance on it. If you have received this e-mail in error, please notify us
immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27
11 265 4200).
> This message is free of all known viruses. It has been screened for
viruses by Blockmail.
>
************************************************************ ****************
*******************
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: PHP generated Excel Spreadsheets

am 22.05.2007 12:23:53 von Dale Attree

I think csv is the way I will have to go.

I think Microsoft may have migrated from the BIFF5 standard with Excel 2007
and that is what is causing this problem.

Unfortunately, the script is database driven and also a company report, so I
am unable to share it.

-----Original Message-----
From: bedul [mailto:landavia81@gmail.com]
Sent: 22 May 2007 12:16 PM
To: Dale Attree
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] PHP generated Excel Spreadsheets

nope.. there were something strange with those excel 2007..
but i always use csv instead excel 2007.. well.. can u share us your script
related to above?
----- Original Message -----
From: "Dale Attree"
To:
Sent: Tuesday, May 22, 2007 3:47 PM
Subject: [PHP-WIN] PHP generated Excel Spreadsheets


> Using PEAR :: Spreadsheet_Excel_Writer
>
>
>
> I am having compatibility issues with Excel 2007.
>
>
>
> Has anyone else experienced issues and got solutions?
>
>
>
> ________________________
>
> Dale Attree
>
> PHP Developer
>
> Jacklin Enterprises
>
> tel: +27 11 265 4282
>
> mobile: +27 83 407 2911
> fax: +27 11 314 2984
>
>
>
>
>
>
>
>
************************************************************ ****************
*******************
> The information contained in this e-mail is confidential and may be
subject to legal privilege.
> Access to this e-mail by anyone other than the intended recipient is
unauthorised.
>
> If you are not the intended recipient you must not use, copy, distribute
or disclose the e-mail or any part of its contents or take any action in
reliance on it. If you have received this e-mail in error, please notify us
immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27
11 265 4200).
> This message is free of all known viruses. It has been screened for
viruses by Blockmail.
>
************************************************************ ****************
*******************
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






************************************************************ ***********************************
The information contained in this e-mail is confidential and may be subject to legal privilege.
Access to this e-mail by anyone other than the intended recipient is unauthorised.

If you are not the intended recipient you must not use, copy, distribute or disclose the e-mail or any part of its contents or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27 11 265 4200).
This message is free of all known viruses. It has been screened for viruses by Blockmail.
************************************************************ ***********************************

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP generated Excel Spreadsheets

am 22.05.2007 12:31:55 von Aleksandar Vojnovic

There is another simple "crude" way of accomplishing the same task which
works for me. Example:

$xls = '





column 1column 2
';
header('Content-type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="export.xls"');
header('Cache-Control: max-age=5, must-revalidate');
header('Pragma: public');
print $xls;
?>

Dale Attree wrote:
> I think csv is the way I will have to go.
>
> I think Microsoft may have migrated from the BIFF5 standard with Excel 2007
> and that is what is causing this problem.
>
> Unfortunately, the script is database driven and also a company report, so I
> am unable to share it.
>
> -----Original Message-----
> From: bedul [mailto:landavia81@gmail.com]
> Sent: 22 May 2007 12:16 PM
> To: Dale Attree
> Cc: php-windows@lists.php.net
> Subject: Re: [PHP-WIN] PHP generated Excel Spreadsheets
>
> nope.. there were something strange with those excel 2007..
> but i always use csv instead excel 2007.. well.. can u share us your script
> related to above?
> ----- Original Message -----
> From: "Dale Attree"
> To:
> Sent: Tuesday, May 22, 2007 3:47 PM
> Subject: [PHP-WIN] PHP generated Excel Spreadsheets
>
>
>
>> Using PEAR :: Spreadsheet_Excel_Writer
>>
>>
>>
>> I am having compatibility issues with Excel 2007.
>>
>>
>>
>> Has anyone else experienced issues and got solutions?
>>
>>
>>
>> ________________________
>>
>> Dale Attree
>>
>> PHP Developer
>>
>> Jacklin Enterprises
>>
>> tel: +27 11 265 4282
>>
>> mobile: +27 83 407 2911
>> fax: +27 11 314 2984
>>
>>
>>
>>
>>
>>
>>
>>
>>
> ************************************************************ ****************
> *******************
>
>> The information contained in this e-mail is confidential and may be
>>
> subject to legal privilege.
>
>> Access to this e-mail by anyone other than the intended recipient is
>>
> unauthorised.
>
>> If you are not the intended recipient you must not use, copy, distribute
>>
> or disclose the e-mail or any part of its contents or take any action in
> reliance on it. If you have received this e-mail in error, please notify us
> immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27
> 11 265 4200).
>
>> This message is free of all known viruses. It has been screened for
>>
> viruses by Blockmail.
>
> ************************************************************ ****************
> *******************
>
>>
>
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Mysql and Textarea

am 22.05.2007 15:29:43 von sam rumaizan

--0-1907947731-1179840583=:88646
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I'm just a php beginner.
So please be patient with my stupid questions.

What am I missing in this code that causing the function can’t update the textarea?

Update button erase the old information from mysql database and replace it with nothing. Basically it can’t read what is inside the Textarea box. Why??

Read the highlighted code.

if (isset($_REQUEST['save_assign_engineer'])) {
$id = (int) $_REQUEST['save_assign_engineer'];
$job_title =
mysql_real_escape_string($_REQUEST['Assign_Engineer'][' .$id . ']['Job_Title']);
$sql = "
UPDATE `lo_data`
SET `Job_Title` = '" . $job_title . "'
WHERE `ID` = " . $id;
mysql_query($sql);
}
if (isset($_POST["R"])) {
$result = mysql_query("SELECT * FROM lo_data WHERE Assign_Engineer ='".$_POST["R"]."'");
}

while($row = mysql_fetch_array($result))
{
echo "";
echo "";
echo "{$row['ID']}";
echo "{$row['Ref_No']}";
echo '

';
echo "
";
echo '
';
echo "{$row['Category']}";
echo "{$row['Assign_Engineer']}";
echo "{$row['Date_Received']}";
echo "{$row['Date_Required']}";
echo "{$row['Date_Assigned']}";
echo "{$row['ProjectedCompletionDate']}";
echo "{$row['Date_Completed']}";
echo "{$row['ManhourSpent']}";
echo "{$row['Status']}";
echo "";
echo"";
}

?>







---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
--0-1907947731-1179840583=:88646--

Re: Mysql and Textarea

am 22.05.2007 15:36:22 von php

Is it just me or are you missing a

tag?
That'd explain the form not posting...

Mike

sam rumaizan skrev:
> I'm just a php beginner.
> So please be patient with my stupid questions.
>
> What am I missing in this code that causing the function can’t update the textarea?
>
> Update button erase the old information from mysql database and replace it with nothing. Basically it can’t read what is inside the Textarea box. Why??
>
> Read the highlighted code.
>
> > if (isset($_REQUEST['save_assign_engineer'])) {
> $id = (int) $_REQUEST['save_assign_engineer'];
> $job_title =
> mysql_real_escape_string($_REQUEST['Assign_Engineer'][' .$id . ']['Job_Title']);
> $sql = "
> UPDATE `lo_data`
> SET `Job_Title` = '" . $job_title . "'
> WHERE `ID` = " . $id;
> mysql_query($sql);
> }
> if (isset($_POST["R"])) {
> $result = mysql_query("SELECT * FROM lo_data WHERE Assign_Engineer ='".$_POST["R"]."'");
> }
>
> while($row = mysql_fetch_array($result))
> {
> echo "";
> echo "";
> echo "{$row['ID']}";
> echo "{$row['Ref_No']}";
> echo '

';
> echo "
";
> echo '
> ';
> echo "{$row['Category']}";
> echo "{$row['Assign_Engineer']}";
> echo "{$row['Date_Received']}";
> echo "{$row['Date_Required']}";
> echo "{$row['Date_Assigned']}";
> echo "{$row['ProjectedCompletionDate']}";
> echo "{$row['Date_Completed']}";
> echo "{$row['ManhourSpent']}";
> echo "{$row['Status']}";
> echo "";
> echo"";
> }
>
> ?>
>
>
>
>
>
>
>
> ---------------------------------
> Looking for earth-friendly autos?
> Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP generated Excel Spreadsheets

am 22.05.2007 17:09:35 von Trevor Gryffyn

I don't see why you'd have compatibility issues with Excel 2007. In theory, Excel_Writer (which we've used where I work but it's been a while since I've messed with it) creates either 97 or 2000 style Excel spreadsheets, which should be importable into Excel 2007 with no problem.

I've used the other methods mentioned too and all work well if you have people downloading the excel file or viewing in excel via web page. If you need to create an XLS file without downloading via a browser, then you're better off trying to get Excel Writer to work, even though it's capabilities are kind of limited.

Some people may mention COM, but that's kind of an ugly solution. You'd need Excel installed on the machine you had PHP running on and you gotta be really sure you close Excel properly when you're done using it. If I recall, there's a "close" function that only closes the worksheet. You need to do like Application.Exit or maybe it was Quit or something to get it to actally close the Excel application. Otherwise, you'll get a copy of Excel running for each time the script is run (server crash anyone?)

Outputting to CSV or HTML with an Excel header, as demonstrated already, are good quick and dirty solutions. Or you can create a page that's an HTML table and use Excel's "Import -> Web Query" function to pull the table when you open the pre-made Excel spreadsheet and auto-refresh the data from the Web Query.

Good luck however you decide to do it.

-TG

= = = Original message = = =

Using PEAR :: Spreadsheet_Excel_Writer

I am having compatibility issues with Excel 2007.

Has anyone else experienced issues and got solutions?
________________________

Dale Attree

PHP Developer

Jacklin Enterprises

tel: +27 11 265 4282

mobile: +27 83 407 2911
fax: +27 11 314 2984







************************************************************ ***********************************
The information contained in this e-mail is confidential and may be subject to legal privilege.
Access to this e-mail by anyone other than the intended recipient is unauthorised.

If you are not the intended recipient you must not use, copy, distribute or disclose the e-mail or any part of its contents or take any action in reliance on it. If you have received this e-mail in error, please notify us immediately by e-mail (postmaster@jacklinenterprises.com) or telephone (+27 11 265 4200).
This message is free of all known viruses. It has been screened for viruses by Blockmail.
************************************************************ ***********************************


___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: PHP generated Excel Spreadsheets

am 22.05.2007 17:18:05 von lferro

I've used the COM method some years ago... and it's a mess!

You need to define, create and destroy all objects explicitly... you
can't use any "method" for creating the objects, because if you use
them, you won't have a reference to the intermediate objects, which will
lead to be unable to close excel properlly.

BTW, there are examples out there of COM use... and most don't do things
explicitly... and thrus fall in the problem reported...

If it was today... i would run away from using it like plage!

;)

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php