Reply to Re: PHP with Excel

Your name:

Reply:


Posted by Sonnich on 01/16/07 10:47

ABC wrote:
> Hi,
> Can i write to MS-Excel using PHP? I am using PHP 5 on Linux. Any help
> would be appreciated!
>
> Thanks,
> Raghu

That depends - you can write a file, which Excel can read, and add a
link to that. AFAIK only ASP has an option to open a file in Excel.
Correct me if I am wrong.

Af for exporting there are a few tricks:

$ff3=fopen($targetdir."\\some_file.xls", "w");
fwrite($ff3, "<html><table border=1>\r\n");
fwrite($ff3, "<tr><td><b>Item:</b></td> <td><b>Used
in:</b></td> <tr>\r\n");
fwrite($ff3, "<tr><td>sugar</td><td>coffee</td></tr>");

For tricks with numbers, try:
<STYLE TYPE="text/css"><!--
.number2dec {mso-number-format: Fixed;}
--></STYLE>
and use it like
<td class=""number2dec"">" . $price ."</td><td class=""number2dec"">
=d" . $y1 . "*e" . $y2 ."</td>"
This will add the first as a number, and the seconds as a fomula.

Try play around with this.

S

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация