[PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Jay Blanchard

G' morning!

Can someone tell me where to find the various options for the Header
function as it relates to M$ Excel? Last week, thanks to this list, we found
a way to open a worksheet in the browser and display data retrieved from a
database. The worksheet opens with no gridlines, I would like to see
gridlines. Are there options that can be placed in the header function. I
have looked at MSDN and did a Google search that did not reveal much of
anything.

Here is the header info being used...

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

Thanks!

Jay Blanchard



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




Re: [PHP] Formatting Information in header? Gridlines in Excel

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

Are you actually sending an excell file, or just data that you expect excell
to format? If your sending a file, then you have to create the grid lines
there. These are HTTP headers that you are talking about, they wouldn't have
any control over excell data.

---John Holmes...

- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 9:16 AM
Subject: [PHP] Formatting Information in header? Gridlines in Excel


 G' morning!

 Can someone tell me where to find the various options for the Header
 function as it relates to M$ Excel? Last week, thanks to this list, we
found
 a way to open a worksheet in the browser and display data retrieved from a
 database. The worksheet opens with no gridlines, I would like to see
 gridlines. Are there options that can be placed in the header function. I
 have looked at MSDN and did a Google search that did not reveal much of
 anything.

 Here is the header info being used...

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

 Thanks!

 Jay Blanchard



 --
 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] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Jay Blanchard

[snip]
Are you actually sending an excell file, or just data that you expect excell
to format? If your sending a file, then you have to create the grid lines
there. These are HTTP headers that you are talking about, they wouldn't have
any control over excell data.
[/snip]

Nope, it's not an Excel file. It is a PHP file imitating an Excel file,
calling data from the DB and generating the worksheet on-the-fly. I want the
gridlines to display and was hoping that there was something I could put in
the PHP page to make sure that this happens.  I am delivering HTML table(s)
to Excel for parsing, which it does just fineuh oh...I feel an idea
coming onlet me try adding a border=1 to the table tagthat works!

Thanks for wording it differently, I saw it in a different light and the
answer cam upon me like a Monday morning lightning strike.

Jay Blanchard



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




Re: [PHP] Formatting Information in header? Gridlines in Excel

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

 coming onlet me try adding a border=1 to the table tagthat
works!

Yeah, I was going to say that. How ever you format the HTML is how it's
going to show up in Excel. Excel is just going to translate the HTML tables
into it's own. Same goes for colors, bold, underline, center, etc.

---John Holmes...


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




RE: [PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Steve Bradwell

This is intriguing me, are you opening up excel in a browser window or just
printing out html tables?? I am confused.

Thanks,
Steve.

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 9:54 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Formatting Information in header? Gridlines in Excel


[snip]
Are you actually sending an excell file, or just data that you expect excell
to format? If your sending a file, then you have to create the grid lines
there. These are HTTP headers that you are talking about, they wouldn't have
any control over excell data.
[/snip]

Nope, it's not an Excel file. It is a PHP file imitating an Excel file,
calling data from the DB and generating the worksheet on-the-fly. I want the
gridlines to display and was hoping that there was something I could put in
the PHP page to make sure that this happens.  I am delivering HTML table(s)
to Excel for parsing, which it does just fineuh oh...I feel an idea
coming onlet me try adding a border=1 to the table tagthat works!

Thanks for wording it differently, I saw it in a different light and the
answer cam upon me like a Monday morning lightning strike.

Jay Blanchard



-- 
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] Formatting Information in header? Gridlines in Excel

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

Both...If you send an HTML file with Excel headers, Excel will open up and
translate the HTML tables into the grid of the Excel spreadsheet.

---John Holmes...

- Original Message -
From: Steve Bradwell [EMAIL PROTECTED]
To: 'Jay Blanchard' [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, May 06, 2002 10:05 AM
Subject: RE: [PHP] Formatting Information in header? Gridlines in Excel


 This is intriguing me, are you opening up excel in a browser window or
just
 printing out html tables?? I am confused.

 Thanks,
 Steve.

 -Original Message-
 From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 06, 2002 9:54 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [PHP] Formatting Information in header? Gridlines in Excel


 [snip]
 Are you actually sending an excell file, or just data that you expect
excell
 to format? If your sending a file, then you have to create the grid lines
 there. These are HTTP headers that you are talking about, they wouldn't
have
 any control over excell data.
 [/snip]

 Nope, it's not an Excel file. It is a PHP file imitating an Excel file,
 calling data from the DB and generating the worksheet on-the-fly. I want
the
 gridlines to display and was hoping that there was something I could put
in
 the PHP page to make sure that this happens.  I am delivering HTML
table(s)
 to Excel for parsing, which it does just fineuh oh...I feel an idea
 coming onlet me try adding a border=1 to the table tagthat
works!

 Thanks for wording it differently, I saw it in a different light and the
 answer cam upon me like a Monday morning lightning strike.

 Jay Blanchard



 --
 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



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




RE: [PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Jay Blanchard

[snip]
This is intriguing me, are you opening up excel in a browser window or just
printing out html tables?? I am confused.
[/snip]

I am using PHP to query a database and create an HTML table based on the
information in the database (in this case it it a large crosstab query).
This is set up to open Excel in a broswer window (inline) and display the
data in a worksheet. All normal Excel functions can be performed on the
worksheet without changing the data in the database. These worksheets then
can be saved to the user's local disk. They can always run the original
query again by requesting the worksheet/page again.

Link pointed to php page that will send to browser a
href=test.php/test.xls Stupid IE trick, the .xls file does not 'exist',
but will fake out Excel to open the .php 'page' in a worksheet. Also, make
sure to include header information listed in previous e-mail at the top of
the PHP page.

The steps are;
1. Create a PHP file with the header info
2. Do a PHP request to the database.
3. Use the results to create an HTML table within the PHP
4. Open this table in a spreadsheet

HTH!

Jay Blanchard



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




RE: [PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Steve Bradwell

Wow! I am impressed, thats too cool. And man is that ever going to be
helpful.

Thanks,
Steve

-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 10:25 AM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Formatting Information in header? Gridlines in Excel


[snip]
This is intriguing me, are you opening up excel in a browser window or just
printing out html tables?? I am confused.
[/snip]

I am using PHP to query a database and create an HTML table based on the
information in the database (in this case it it a large crosstab query).
This is set up to open Excel in a broswer window (inline) and display the
data in a worksheet. All normal Excel functions can be performed on the
worksheet without changing the data in the database. These worksheets then
can be saved to the user's local disk. They can always run the original
query again by requesting the worksheet/page again.

Link pointed to php page that will send to browser a
href=test.php/test.xls Stupid IE trick, the .xls file does not 'exist',
but will fake out Excel to open the .php 'page' in a worksheet. Also, make
sure to include header information listed in previous e-mail at the top of
the PHP page.

The steps are;
1. Create a PHP file with the header info
2. Do a PHP request to the database.
3. Use the results to create an HTML table within the PHP
4. Open this table in a spreadsheet

HTH!

Jay Blanchard



-- 
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] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread David Freeman


  -Original Message-
  Can someone tell me where to find the various options for 
  the Header function as it relates to M$ Excel?
  -Original Message-

As far as I know, you can't.  Headers are for html/http information not
for any particular helper application.  If you want to have control
over the configuration of Excel you'll have to learn to output your data
as a valid Excel spreadsheet with the relevant formatting information
included - this would obviously involve knowing a fair bit about the
data structure and format of .xls files.

CYA, Dave



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




Re: [PHP] Formatting Information in header? Gridlines in Excel

2002-05-06 Thread Paul Roberts

strange i just worked this out over the weekend.

I'm going to be use it to email data that will be inserted 
into an excel sheet you just tell it the html file is a xls file 
in the mime headers and it opens the file up in excel, 
no problem and no messing with csv files, comas,
xml support and all that.

ie
Content-Type: application/vnd.ms-excel;
 name=test.xls 
Content-Transfer-Encoding: base64
Content-Disposition: attachment; 
 filename=test.xls;

if it's excel 2002 (xp) you can use styles and edit the doc properties.
have a look for x:DisplayGridlines/ or x:DoNotDisplayGridlines/
in the file. If it's 97 then you need the border=1 in the table though.

have fun.

Paul Roberts
[EMAIL PROTECTED]

- Original Message - 
From: Jay Blanchard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 06, 2002 3:25 PM
Subject: RE: [PHP] Formatting Information in header? Gridlines in Excel


 [snip]
 This is intriguing me, are you opening up excel in a browser window or just
 printing out html tables?? I am confused.
 [/snip]
 
 I am using PHP to query a database and create an HTML table based on the
 information in the database (in this case it it a large crosstab query).
 This is set up to open Excel in a broswer window (inline) and display the
 data in a worksheet. All normal Excel functions can be performed on the
 worksheet without changing the data in the database. These worksheets then
 can be saved to the user's local disk. They can always run the original
 query again by requesting the worksheet/page again.
 
 Link pointed to php page that will send to browser a
 href=test.php/test.xls Stupid IE trick, the .xls file does not 'exist',
 but will fake out Excel to open the .php 'page' in a worksheet. Also, make
 sure to include header information listed in previous e-mail at the top of
 the PHP page.
 
 The steps are;
 1. Create a PHP file with the header info
 2. Do a PHP request to the database.
 3. Use the results to create an HTML table within the PHP
 4. Open this table in a spreadsheet
 
 HTH!
 
 Jay Blanchard
 
 
 
 -- 
 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