Convert number to string on excel using html export/import on php

Posted: May 21, 2013 in web
<?php

$file="test.xls";

$test="<style> .phone{ mso-number-format:\@; } </style><table border=1><tr><td>Cell 1</td><td class='phone'>11111111111111111111111111111111111 </td></tr></table>";

header("Content-type: application/vnd.ms-excel");

header("Content-Disposition: attachment; filename=$file");

echo $test;

?>
Advertisements
Comments
  1. jafar ikbal sk says:

    thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s