spreadsheet column width

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sumithar

    spreadsheet column width

    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");
  • Paul Lautman

    #2
    Re: spreadsheet column width

    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.publi c.excel.misc or microsoft.publi c.excel.program ming

    I think you'll have more luck writing it out in XML format:



    Comment

    • sumithar

      #3
      Re: spreadsheet column width

      On Jun 22, 5:17 pm, "Paul Lautman" <paul.laut...@b tinternet.com>
      wrote:
      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.publi c.excel.misc or microsoft.publi c.excel.program ming
      >
      I think you'll have more luck writing it out in XML format:http://msdn.microsoft.com/en-us/libr...ffice.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

      Comment

      Working...