[PHP] PHP excel graph generator

2009-12-30 Thread Manoj Singh
Hi,

I have the task to create excel sheet with embedded charts and graphs
through PHP. The charts are pie chart and bar chart. The project will be run
on the linux server. My question is it is possible to implement this through
PHP? If yes, then please suggest the available implementations.

Thanks in advance.

Regards,
Manoj


RE: [PHP] PHP excel capability

2007-04-23 Thread tg-php
I had some issue when I tried CSV in the past.  I don't know if there was some 
issue with use of commas in the data and not getting Excel to properly use 
some data, with commas, some more data so that it'd omit the quotes as well 
or what.  In the end, for the quick and dirty throwaway project I was working 
on, HTML tables worked the best.  Or at least quicker than figuring out what 
our problem with CSV was.

Not the best solution, but was the best for what we needed and it's definitely 
worth noting that CSV (making sure your data doesn't have commas or you 
properly compensate for that) and HTML are both good quick and dirty 
download-to-Excel options.

And as Richard mentioned, COM requires Windows, but if you want to do anything 
with it, you need to have something for PHP to talk to via COM.  In this 
instance, we're talking about PHP + Excel.

There's little things you have to be careful with when using COM too, 
especially on your server.  Making sure you close the app that you're 
interacting with properly is one of the biggest.  You might issue a 'close' 
command and find out it only closes the document, not the app as you might 
think.  Suddely you have 50 instances of Excel running (non-visible) on your 
server and you're up a creek.

COM is great to have as an option, but really isn't usually the best solution 
unless you have no other choice.

-TG

= = = Original message = = =

On Wed, April 18, 2007 11:25 am, [EMAIL PROTECTED] wrote:
 Also, if you output an HTML table and set the content type in your
 header to an Excel content type, it should ask the client PC to open
 the page in Excel (assuming they have it installed).  This works for a
 real quick and dirty export-to-excel type thing.   Then PHP isn't
 really creating an Excel file, but presenting the data in a format
 that Excel on the client PC can read.

If you output CSV format and send Excel content-type, that also works,
and may be a more natural coding than HTML tables.

Or not, depending on what you are doing. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?



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

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



[PHP] PHP excel capability

2007-04-18 Thread Jonathan Kahan

Hi all,

Can PHP be used to generate an excel file that A) Contains Macros B) Allows 
Graphics to be attached C) where cells can contain borders as well as cells 
being merged. I know there is some PHP excel functionality so i am assume 
basics like underlines, italics and i am hoping vertical alignments can be 
done.


If the answer is no, then can a template that has all of these be opened and 
read using php where all that needs to be done is simply place in certain 
cells whatever values it is that I want to place.


Lastly, do only newer versions of PHP contain excel/pdf functionality?

I am in a bit of a time crunch so I apologize if this is not considered PHP 
stuff or if I could have found my answer easily online. I could not find 
this discussed in any other posts. Thanks in advance for any help you can 
give.



Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com 


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



RE: [PHP] PHP excel capability

2007-04-18 Thread Jay Blanchard
[snip]
Can PHP be used to generate an excel file
[/snip]

http://www.php.net/com

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



Re: [PHP] PHP excel capability

2007-04-18 Thread André Medeiros

1) You'll be better off using templates, AFAIK.

2) PHP has classes to generate PDF's without the need of extensions.
(http://www.fpdf.org/)

On 4/18/07, Jonathan Kahan [EMAIL PROTECTED] wrote:

Hi all,

Can PHP be used to generate an excel file that A) Contains Macros B) Allows
Graphics to be attached C) where cells can contain borders as well as cells
being merged. I know there is some PHP excel functionality so i am assume
basics like underlines, italics and i am hoping vertical alignments can be
done.

If the answer is no, then can a template that has all of these be opened and
read using php where all that needs to be done is simply place in certain
cells whatever values it is that I want to place.

Lastly, do only newer versions of PHP contain excel/pdf functionality?

I am in a bit of a time crunch so I apologize if this is not considered PHP
stuff or if I could have found my answer easily online. I could not find
this discussed in any other posts. Thanks in advance for any help you can
give.


Kind Regards
Jonathan Kahan


Systems Developer
Estrin Technologies, inc.
1375 Broadway, 3rd Floor, New York, NY, 10018

Email: [EMAIL PROTECTED]
Web: http://www.estrintech.com

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




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



RE: [PHP] PHP excel capability

2007-04-18 Thread tg-php
Or, even better and more useful:

http://pear.php.net/package/Spreadsheet_Excel_Writer

It's not perfect, but it does the basic job.

Also, if you output an HTML table and set the content type in your header to an 
Excel content type, it should ask the client PC to open the page in Excel 
(assuming they have it installed).  This works for a real quick and dirty 
export-to-excel type thing.   Then PHP isn't really creating an Excel file, but 
presenting the data in a format that Excel on the client PC can read.

Or you can use COM as Jay recommended, but that requires Excel to be installed 
on the PC that's running PHP and can get a little ugly.

-TG

= = = Original message = = =

[snip]
Can PHP be used to generate an excel file
[/snip]

http://www.php.net/com



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

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



RE: [PHP] PHP excel capability

2007-04-18 Thread Zoltán Németh
2007. 04. 18, szerda keltezéssel 12.25-kor [EMAIL PROTECTED]
ezt írta:
 Or, even better and more useful:
 
 http://pear.php.net/package/Spreadsheet_Excel_Writer
 
 It's not perfect, but it does the basic job.
 
 Also, if you output an HTML table and set the content type in your header to 
 an Excel content type, it should ask the client PC to open the page in Excel 
 (assuming they have it installed).  This works for a real quick and dirty 
 export-to-excel type thing.   Then PHP isn't really creating an Excel file, 
 but presenting the data in a format that Excel on the client PC can read.

I usually achieve this by writing the data into a csv file and
redirecting to that file with header() calls. csv is by default opened
in excel on winsuxx systems, so it works for me - although the OP wants
macros and stuff like that which can not be included in a csv file or a
html table...

 Or you can use COM as Jay recommended, but that requires Excel to be 
 installed on the PC that's running PHP and can get a little ugly.

really? I thought it requires only winsuxx to be installed...

greets
Zoltán Németh

 
 -TG
 
 = = = Original message = = =
 
 [snip]
 Can PHP be used to generate an excel file
 [/snip]
 
 http://www.php.net/com
 
 
 
 ___
 Sent by ePrompter, the premier email notification software.
 Free download at http://www.ePrompter.com.
 

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



Re: [PHP] PHP excel capability

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 10:46 am, Jonathan Kahan wrote:
 Can PHP be used to generate an excel file that A) Contains Macros B)
 Allows
 Graphics to be attached C) where cells can contain borders as well as
 cells
 being merged. I know there is some PHP excel functionality so i am
 assume
 basics like underlines, italics and i am hoping vertical alignments
 can be
 done.

If it's running under Windows, you could probably fire up Excel as a
COM object and do anything Excel can do.

As for the excel-writer package[s] out there you'd probably find out
faster/accurate-er by researching them in their documentation or their
own forums rather than here.

 If the answer is no, then can a template that has all of these be
 opened and
 read using php where all that needs to be done is simply place in
 certain
 cells whatever values it is that I want to place.

Possibly.

Another option might be to have PHP spit out CSV and have an excel
macro/scripty thing to suck in the CSV and fill in the cells like a
mail-merge.

I have to ASSUME Excel has something like that feature, somewhere in
that mess of dialogs, after all these years...

 Lastly, do only newer versions of PHP contain excel/pdf functionality?

libPDF has been around for a lonnng time.

Like I think I was using it in PHP3 days.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] PHP excel capability

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 11:25 am, [EMAIL PROTECTED] wrote:
 Also, if you output an HTML table and set the content type in your
 header to an Excel content type, it should ask the client PC to open
 the page in Excel (assuming they have it installed).  This works for a
 real quick and dirty export-to-excel type thing.   Then PHP isn't
 really creating an Excel file, but presenting the data in a format
 that Excel on the client PC can read.

If you output CSV format and send Excel content-type, that also works,
and may be a more natural coding than HTML tables.

Or not, depending on what you are doing. :-)

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] PHP excel capability

2007-04-18 Thread Richard Lynch
On Wed, April 18, 2007 3:42 pm, Zoltán Németh wrote:
 Or you can use COM as Jay recommended, but that requires Excel to be
 installed on the PC that's running PHP and can get a little ugly.

 really? I thought it requires only winsuxx to be installed...

COM only requires Windows (afaik there's no Linux COM...) but if you
want the COM module to *do* something it has to interact with some
other program/dll...

Like if you want it to interact with Excel to make it do anything
Excel can do (that you can find docs on or figure out from the COM
object layout) then you kinda have to have Excel for it to interact
with to do Excel.

PHP+COM is kinda like a PHP link-loader for DLLs, basically...

That's probably a gross over-simplification, but it's how I think of it.

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-09 Thread jon roig
Right... But the principal is still the same. Excel handles those types
of fields in a uniform way, regardless of whether you do the entry
yourself or if you just import a csv file.

-- jon

-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 06, 2004 5:15 PM
To: jon roig
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP, Excel, and tab delimited files question


jon roig wrote:
 Nah... Try it in excel itself and you'll see what I'm talking about. 
 You have to do it in numeric fields.
 
 Do this in an excel field:
 - Type 10 and hit return.
 ... It becomes 10, right?
 
 Now try it like this: '000100
 ... Tada! It stays as 00100 and puts a little green tab in the top 
 left corner.
 
 There's no closing ' in this example, just the opening one at the 
 beginning of the text.
 
 Hope that helps... 'course, I'm using excel 2002, so maybe different 
 versions do different things...
 
   -- jon
 

This is different. You are talking about inputing data in excell 
application, but Jay is building csv file.

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-09 Thread Jay Blanchard
[snip]
Right... But the principal is still the same. Excel handles those types
of fields in a uniform way, regardless of whether you do the entry
yourself or if you just import a csv file.
[/snip]

Actually that is not correct. We have prefaced the data with the single
quote in the output process and that single quote is visible in each
cell where that occurs. 

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-09 Thread Robert Sossomon
It may wind up being a user-learning issue.

I dump things to pipe delimited file (whether in *nix land or winDoze)
and that way the users can open it in Excel.  The ones who have to open
the files I just go to their desks the first time and show them how to
open the file, delimit it on the | and then on the Next screen change
the ### field to TEXT to keep it formatted correctly.  A pain in the
betuty the first time, but once they are shown they understand it.  If
they have to do work with the file they then save it local to their
machine and start hacking it in the way they want.

Only way I found to work around quotes and things, but I'm always
willing to learn new tricks.  :)

Robert

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



[PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Jay Blanchard
In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;

header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate post-check=0 pre-check=0);

However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?

TIA!

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread jon roig
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.

-- jon

---
jon roig
web developer
email: [EMAIL PROTECTED]
phone: 888.230.7557



-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 06, 2004 2:40 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP, Excel, and tab delimited files question


In many of our apps we save tab delimited text files to be later opened
from the browser using the following set of headers;

header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate post-check=0 pre-check=0);

However, fields that start with 0 (zero) generally drop the zero so that
0201 becomes 201 (which is not correct for our purposes). Does anyone
know a quick way to specify in the header to make it text only?

TIA!

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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Jay Blanchard
[snip]
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
[/snip]

Tried that, the ' shows up. Don't want that to happen

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



Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
Do double quotes around help?

Jay Blanchard wrote:
[snip]
Don't do it in the header, but in the field itself just put a ' before
the first character and excel will interpret it as a text field.
[/snip]
Tried that, the ' shows up. Don't want that to happen

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


RE: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread jon roig
Nah... Try it in excel itself and you'll see what I'm talking about. You
have to do it in numeric fields.

Do this in an excel field:
- Type 10 and hit return.
... It becomes 10, right?

Now try it like this: '000100
... Tada! It stays as 00100 and puts a little green tab in the top left
corner.

There's no closing ' in this example, just the opening one at the
beginning of the text.

Hope that helps... 'course, I'm using excel 2002, so maybe different
versions do different things...

-- jon




-Original Message-
From: Marek Kilimajer [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 06, 2004 3:02 PM
To: Jay Blanchard
Cc: jon roig; [EMAIL PROTECTED]
Subject: Re: [PHP] PHP, Excel, and tab delimited files question


Do double quotes around help?

Jay Blanchard wrote:
 [snip]
 Don't do it in the header, but in the field itself just put a ' before

 the first character and excel will interpret it as a text field. 
 [/snip]
 
 Tried that, the ' shows up. Don't want that to happen
 

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.572 / Virus Database: 362 - Release Date: 1/27/2004
 

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



Re: [PHP] PHP, Excel, and tab delimited files question

2004-02-06 Thread Marek Kilimajer
jon roig wrote:
Nah... Try it in excel itself and you'll see what I'm talking about. You
have to do it in numeric fields.
Do this in an excel field:
- Type 10 and hit return.
... It becomes 10, right?
Now try it like this: '000100
... Tada! It stays as 00100 and puts a little green tab in the top left
corner.
There's no closing ' in this example, just the opening one at the
beginning of the text.
Hope that helps... 'course, I'm using excel 2002, so maybe different
versions do different things...
	-- jon

This is different. You are talking about inputing data in excell 
application, but Jay is building csv file.

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


[PHP] PHP, Excel, jpgraph - can the graph be included in the Excel output?

2003-07-14 Thread Jay Blanchard
Good morning!

I have several reports that are generated using PHP  MySQL for which I
would like to include a graph using the excellent jpgraph
(http://www.aditus.nu/jpgraph/) class for PHP. 

?php
ob_start();

// excel headers
header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0, pre-check=0);

print(Excel Test Graph\n);
print(date(Y-m-d) . \n\n);

print(\n\n\n);

ob_end_flush();
?
img src=graph.php

The file output for Excel is in the tab delimited format and the IMG tag
is what calls the graph. I have tried many things to get the graph to
appear in the spreadsheet, but to no avail. Can someone point me in the
right direction? 

A huge thanks in advance!

Jay 

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



Re: [PHP] PHP, Excel, jpgraph - can the graph be included in theExcel output?

2003-07-14 Thread Marek Kilimajer
You need a class that can create xls files with images.
Or you can create a Web Archive: 
http://officeupdate.microsoft.com/office/webarchive.htm

Jay Blanchard wrote:

Good morning!

I have several reports that are generated using PHP  MySQL for which I
would like to include a graph using the excellent jpgraph
(http://www.aditus.nu/jpgraph/) class for PHP. 

?php
ob_start();
// excel headers
header(Content-Type:  application/vnd.ms-excel);
header(Content-Disposition: inline; filename=\excel.xls\);
header(Expires: 0);
header(Cache-Control: must-revalidate, post-check=0, pre-check=0);
print(Excel Test Graph\n);
print(date(Y-m-d) . \n\n);
print(\n\n\n);

ob_end_flush();
?
img src=graph.php
The file output for Excel is in the tab delimited format and the IMG tag
is what calls the graph. I have tried many things to get the graph to
appear in the spreadsheet, but to no avail. Can someone point me in the
right direction? 

A huge thanks in advance!

Jay 



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


RE: [PHP] PHP, Excel, jpgraph - can the graph be included in the Excel output?

2003-07-14 Thread Jay Blanchard
[snip]
You need a class that can create xls files with images.
Or you can create a Web Archive: 
http://officeupdate.microsoft.com/office/webarchive.htm
[/snip]

Thanks! We have looked at this, but have arrived at the problem of
opening the file for the user. Here is the process in a nutshell...

User selects report and enters a cut-off date
PHP retrieves info from database
info is processed
PHP opens an Excel headered file in the browser
(hopefully graph appears in page)
user is happy.

I guess that we could open/save the file via PHP and do a redirect to
open.

We can open a frameset, showing the tab delimited Excel file in one
frame and the graph in another. Not very elegant, but if push comes to
shove...

Thanks!

Jay

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



Re: [PHP] PHP, Excel, jpgraph - can the graph be included in theExcel output?

2003-07-14 Thread Marek Kilimajer


Jay Blanchard wrote:

[snip]
You need a class that can create xls files with images.
Or you can create a Web Archive: 
http://officeupdate.microsoft.com/office/webarchive.htm
[/snip]

Thanks! We have looked at this, but have arrived at the problem of
opening the file for the user. 
This should be a question of sending the right headers.

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


[PHP] PHP Excel

2002-05-20 Thread LeTortorec, Jean-Louis

Hello every one:

I'm trying to create XLS files on the fly.
I found BiffWriter. Looks great for adding texts and numbers, but not
formulas.

Has anyone implemented something about formulas?

Thanks.

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




Re: [PHP] PHP Excel

2002-05-20 Thread 1LT John W. Holmes

Can you just write out the formula to a cell? i.e. write the value
=SUM(C1:C5) to a cell and see if it's evaluated? Just throwing things
out...

I would think that you wouldn't need formulas. Isn't that the idea of using
PHP to create the Excel document? Have PHP compute the values of the
formulas and print out the actual value. May not work for your case,
though...

---John Holmes...

- Original Message -
From: LeTortorec, Jean-Louis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 2:42 PM
Subject: [PHP] PHP  Excel


 Hello every one:

 I'm trying to create XLS files on the fly.
 I found BiffWriter. Looks great for adding texts and numbers, but not
 formulas.

 Has anyone implemented something about formulas?

 Thanks.

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



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




RE: [PHP] PHP Excel

2002-05-20 Thread Scott Hurring

Are you on a Win32 platform?

If so, use COM...

$cell = $sheet-Cells($row,$col);
$cell-activate;
$cell-formula = your formula;

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

 -Original Message-
 From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 20, 2002 2:42 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP  Excel
 
 
 Hello every one:
 
 I'm trying to create XLS files on the fly.
 I found BiffWriter. Looks great for adding texts and numbers, but not
 formulas.
 
 Has anyone implemented something about formulas?
 
 Thanks.
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

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




RE: [PHP] PHP Excel

2002-05-20 Thread Scott Hurring

 -Original Message-
 From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]]
 Subject: Re: [PHP] PHP  Excel
 
 I would think that you wouldn't need formulas. Isn't that the 
 idea of using
 PHP to create the Excel document? Have PHP compute the values of the
 formulas and print out the actual value. May not work for your case,
 though...
 
 ---John Holmes...

What if the user opens up the sheet and changes a number
after PHP creates it?  Wouldn't you want formulas to
re-compute the sheet and keep it correct?  :)

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




Re: [PHP] PHP Excel

2002-05-20 Thread 1LT John W. Holmes

 What if the user opens up the sheet and changes a number
 after PHP creates it?  Wouldn't you want formulas to
 re-compute the sheet and keep it correct?  :)

Like I said, it depends on your case. When I create an Excel file, it's a
snapshot of everything. If you need an updated speadsheet, you go back to
the webpage and hit the button again... I don't expect people to be updating
the actual excel file.

---John Holmes...


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




[PHP] PHP, Excel, .CSV's, and Regular Expressions Help Needed!

2001-07-23 Thread Jeff Lacy

Hello Everyone,

A client of mine is working with excel, and I need to move the data from
excel to something php can deal with a little better.  Naturally, I figured
using .csv would be easiest, but I am running into several problems.I
can get around them, but I need a regular expression (and I am NOT good at
writing those).

I'm not quite sure how I should explain what the regular expression ought to
do, so I am giving an example of the data ought to look like in php (after
the regular expressions), and how it looks in the .csv.

NOTE: I am exploding the data, so all ,'s must be changed into COMMA's.

+---++
| php  | .cvs
|
+---++
piCOMMA 3.14,hey is for horsespi, 3.14,hey is for horses
byeCOMMA bye,ciaoCOMMA ciaobye, bye, ciao, ciao
good morning,I'm Bob good morning, I'm Bob
sleep is good,IceCOMMACOMMAsleep is good,Ice,,


If those four examples aren't enough, please let me know.  I am NOT on the
php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND
to [EMAIL PROTECTED]).

Thank you very much (in advance),

Jeff







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP, Excel, .CSV's, and Regular Expressions Help Needed!

2001-07-23 Thread Unni

Hi Jeff,

I didn't  get your question. Can you elobrate little bit more, if 
possible? What is the input and what is output you are expecting and 
what do you want to do in the process?

Thanks.

Jeff Lacy wrote:

 Hello Everyone,
 
 A client of mine is working with excel, and I need to move the data from
 excel to something php can deal with a little better.  Naturally, I figured
 using .csv would be easiest, but I am running into several problems.I
 can get around them, but I need a regular expression (and I am NOT good at
 writing those).
 
 I'm not quite sure how I should explain what the regular expression ought to
 do, so I am giving an example of the data ought to look like in php (after
 the regular expressions), and how it looks in the .csv.
 
 NOTE: I am exploding the data, so all ,'s must be changed into COMMA's.
 
 +---++
 | php  | .cvs
 |
 +---++
 piCOMMA 3.14,hey is for horsespi, 3.14,hey is for horses
 byeCOMMA bye,ciaoCOMMA ciaobye, bye, ciao, ciao
 good morning,I'm Bob good morning, I'm Bob
 sleep is good,IceCOMMACOMMAsleep is good,Ice,,
 
 
 If those four examples aren't enough, please let me know.  I am NOT on the
 php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND
 to [EMAIL PROTECTED]).
 
 Thank you very much (in advance),
 
 Jeff
 
 
 
 
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP, Excel, CSV and Problems!

2001-07-21 Thread Jeff Lacy

Hello Everyone,

A client of mine is working with excel, and I need to move the data from
excel to something php can deal with a little better.  Naturally, I figured
using .csv would be easiest, but I am running into several problems.I
can get around them, but I need a regular expression (and I am NOT good at
writing those).

I'm not quite sure how I should explain what the regular expression ought to
do, so I am giving an example of the data ought to look like in php (after
the regular expressions), and how it looks in the .csv.

NOTE: I am exploding the data, so all ,'s must be changed into COMMA's.



| php
| .csv   |


heyaCOMMA there,hey is for horses  heya, there,hey is
for horses
byeCOMMA bye,ciaoCOMMA ciao  bye, bye, ciao, ciao
good morning,I'm Bob Villa   good
morning, I'm Bob Villa
sleep is good,IceCOMMA ThingyCOMMA  sleep is good,Ice, Thingy,


If those four examples aren't enough, please let me know.  I am NOT on the
php mailing list, so PLEASE send messages to me ([EMAIL PROTECTED] AND
to [EMAIL PROTECTED]).

Thank you very much (in advance),

Jeff


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]