Click here to get back home

spreadsheet column width

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
spreadsheet column width sumithar 06-22-2008
Get Chitika Premium
Posted by sumithar on June 22, 2008, 4:25 pm
Please log in for more thread options
I am trying to create a spreadsheet from mysql data. I have the
requisite headers in place for content type and all that.
All I am doing is executing the SQL query and displaying the data
formatted in an HTML table.

Whatever width I assign to the HTML table columns ( using <td
width="nnn"> it doesn't have any impact on the width of the
spreadsheet column- that is always staying the same.

Any idea how to control it?

The headers I am using are as follows
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: attachment; filename=report.xls");
header("Pragma: no-cache");
header("Expires: 0");

Posted by Paul Lautman on June 22, 2008, 5:17 pm
Please log in for more thread options
sumithar wrote:
>I am trying to create a spreadsheet from mysql data. I have the
> requisite headers in place for content type and all that.
> All I am doing is executing the SQL query and displaying the data
> formatted in an HTML table.
>
> Whatever width I assign to the HTML table columns ( using <td
> width="nnn"> it doesn't have any impact on the width of the
> spreadsheet column- that is always staying the same.
>
> Any idea how to control it?
>
> The headers I am using are as follows
> header("Content-type: application/vnd.ms-excel");
> header("Content-disposition: attachment; filename=report.xls");
> header("Pragma: no-cache");
> header("Expires: 0");

This isn't really a php question. I would suggest asking it in one of :

microsoft.public.excel.misc or microsoft.public.excel.programming

I think you'll have more luck writing it out in XML format:
http://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx



Posted by sumithar on June 22, 2008, 5:40 pm
Please log in for more thread options
wrote:
> sumithar wrote:
> >I am trying to create a spreadsheet from mysql data. =A0I have the
> > requisite headers in place for content type and all that.
> > All I am doing is executing the SQL query and displaying the data
> > formatted in an HTML table.
>
> > Whatever width I assign to the HTML table columns ( using <td
> > width=3D"nnn"> it doesn't have any impact on the width of the
> > spreadsheet column- that is always staying the same.
>
> > Any idea how to control it?
>
> > The headers I am using are as follows
> > header("Content-type: application/vnd.ms-excel");
> > header("Content-disposition: attachment; filename=3Dreport.xls");
> > header("Pragma: no-cache");
> > header("Expires: 0");
>
> This isn't really a php question. I would suggest asking it in one of :
>
> microsoft.public.excel.misc or microsoft.public.excel.programming
>
> I think you'll have more luck writing it out in XML format:http://msdn.mi=
crosoft.com/en-us/library/aa140066(office.10).aspx

OK- I will try those forums. Come to think of it, there is no php
factor in this apart from the headers, I guess.
Rgds

Similar ThreadsPosted
spreadsheet July 3, 2007, 9:21 pm
Using PHP to read XL Spreadsheet Files? July 26, 2006, 11:43 am
Can I read an Excel spreadsheet? October 27, 2006, 3:57 am
output to spreadsheet - how to use format? June 7, 2007, 7:33 pm
Want to get data from google spreadsheet January 31, 2008, 5:41 am
read images/graphics in spreadsheet July 14, 2007, 11:00 am
Want XML file to open in spreadsheet, not browser... how to? January 25, 2008, 11:37 am
Can't insert spreadsheet edited in Linux with PHP script December 22, 2004, 9:55 am
Pear Spreadsheet writer - writing 0 byte file October 4, 2007, 10:13 am
in apache June 24, 2005, 11:46 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap