largersmallerreset
 Main Menu
 Lastest Release
AppServ
  AppServ 2.6.0
     2008-06-10 00:35:27
  AppServ 2.5.10
     2008-06-10 00:33:27

AppServ Misc
  Zend Optimizer 3.3.0...
     2007-07-19 00:34:08
  UTF-8 Converter
     2006-08-03 17:04:37
 Web Link

       


        
  
Best Sellers GPS & Navigator  
      Best Sellers GPS 
 
 - Best Camera store
 - Best Electronics store 
 - Traval Thailand
 - Online Flash Game
 - GPS Systems
 Who's Online
There are currently, 117 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
AppServNetwork: PHP Language

Search on This Topic:   
[ Go to Home | Select a New Topic ]

Easy way to create XLS file from PHP
Posted by apples on Wednesday, October 11 @ 09:52:55 ICT (263646 reads)
PHP Language

         Everybody knows phpMyAdmin can export file to Excel format but phpMyAdmin just export .csv file,not real Excel file format. If you are interest in PHP programming and need to export to the real Excel format please check it out !

Example PHP export to XLS file format.

1. Create Function for XLS

function xlsBOF() {
    echo
pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);  
    return;
}

function
xlsEOF() {
    echo
pack("ss", 0x0A, 0x00);
    return;
}

function
xlsWriteNumber($Row, $Col, $Value) {
    echo
pack("sssss", 0x203, 14, $Row, $Col, 0x0);
    echo
pack("d", $Value);
    return;
}

function
xlsWriteLabel($Row, $Col, $Value ) {
    
$L = strlen($Value);
    echo
pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
    echo
$Value;
return;
}



(Read More... | 15906 bytes more | Score: 4.76)

 Languages







 Donate to AppServ

         
              $5 US

         
             $10 US

         
             $15 US

         
             $20 US

 Google ads




 
Hosted By Sourceforge

Page Generation: 0.1523 Seconds