Loading ...
Sorry, an error occurred while loading the content.

Re: CSV FILE FORMAT

Expand Messages
  • lamy_ici
    forgot to mention, if you really want to retain the styles try using richtext format (.RTF), you can also do tables here and embed pictures too, try looking at
    Message 1 of 3 , Dec 27, 2006
    • 0 Attachment
      forgot to mention, if you really want to retain the styles try using
      richtext format (.RTF), you can also do tables here and embed
      pictures too, try looking at this link

      http://www.phpclasses.org/browse/package/1805.html



      --- In phpexperts@yahoogroups.com, "SANTANU BHATTACHARYYA"
      <santanu186@...> wrote:
      >
      > Hello Experts,
      >
      > I am sorry for repeating this topic.But I feel that due to some
      > reason may be my post was got your attention so I am posting my
      topic
      > again.
      >
      > I am creating a CSV file which will contain data from mysql. It is
      > working fine.
      >
      >
      > Now I have two problems,
      >
      > 1. In the CSV file how can I make the heading BOLD or any style ?
      >
      > 2. When the user is clicking on the open button the file opens there
      > itself I want to open it in a new window.
      >
      > I am giving you the sample code.
      >
      > Please help me by specifying what modifications are neeed and
      where ?
      >
      > <?php
      >
      > $csv='"ID","JOIN DATE","EMAIL"';
      >
      > $csv.="\n";
      >
      > $r = here comes the query statement
      >
      > while (.......)
      > {
      > $csv.=.....
      > }
      > header("Content-type: application/vnd.ms-excel");
      > header("Content-disposition: csv; filename=" . date("Y-m-
      > d") ."_".$table.".csv; size=".strlen($csv));
      > echo $csv;
      > exit;
      > ?>
      >
      > Regards
      > SANTANU BHATTACHARYYA
      > KOLKATA
      > INDIA
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.