Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

export a php file to excel -


how can set style table while export php file excel

using following code can export php file excel

header("content-disposition: attachment; filename=".$fname."application.xls");  print "<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\"> <style>  @page     {margin:1.0in .75in 1.0in .75in;     mso-header-margin:.5in;     mso-footer-margin:.5in;} tr     {mso-height-source:auto;} col     {mso-width-source:auto;} br     {mso-data-placement:same-cell;     }  .style0     {mso-number-format:general;     text-align:general;     vertical-align:bottom;     white-space:nowrap;     mso-rotate:0;     mso-background-source:auto;     mso-pattern:auto;     color:windowtext;     font-size:10.0pt;     font-weight:400;     font-style:normal;     text-decoration:none;     font-family:arial;     mso-generic-font-family:auto;     mso-font-charset:0;     border:none;     mso-protection:locked visible;     mso-style-name:normal;     mso-style-id:0;} td     {mso-style-parent:style0;     padding-top:1px;     padding-right:1px;     padding-left:1px;     mso-ignore:padding;     color:windowtext;     font-size:10.0pt;     font-weight:400;     font-style:normal;     text-decoration:none;     font-family:arial;     mso-generic-font-family:auto;     mso-font-charset:0;     mso-number-format:general;     text-align:general;     vertical-align:bottom;     border:none;     mso-background-source:auto;     mso-pattern:auto;     mso-protection:locked visible;     white-space:nowrap;     mso-rotate:0;} .grids     {mso-style-parent:style0;     border:.5pt solid windowtext;}.head{     font-weight:bold; }  </style> <head> <!--[if gte mso 9]><xml> <x:excelworkbook> <x:excelworksheets> <x:excelworksheet> <x:name>application list</x:name> <x:worksheetoptions> <x:print> </x:print> </x:worksheetoptions> </x:excelworksheet> </x:excelworksheets> </x:excelworkbook>  </xml> <![endif]-->  </head> <body>";  print '<table width="100%" border="0" cellspacing="1" cellpadding="2" class="tbl_content">';  print ' <tr class="head" valign="bottom">                                                         <td align="center" width="7%" height="22"><b>sl no</b></td>                                                     <td align="left" width="18%"><b>name of party</b></td>                                                     <td align="left" width="18%"><b>godown</b></td>                                                     <td align="center" width="16%" ><b>invoice no</b></td>                                                     <td align="center" width="12%"><b>date</b></td>                                                     <td align="right" width="17%"><b>taxable turnover</b></td>                                                     <td align="right" width="14%"><b>vat amount</b></td>                                                     <td align="right" width="8%"><b>cess amt.</b></td>                                                     <td align="right" width="16%"><b>total turnover</b></td>                                                 </tr>';     print '</table></body></html>';   

but style not taken when display in browser.

check out lib: php_writeexcel


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -