I have this following code snippet taken from http://network.convergenceservices.in/forum/5-components/2191-export-excel-a-new-way.html
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;
        }
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/force-download");
    header("Content-Type: application/octet-stream");
    header("Content-Type: application/download");;
    header("Content-Disposition: attachment;filename=vandetailslist.xls ");
    header("Content-Transfer-Encoding: binary");
    xlsBOF();
    xlsWriteLabel(0,0,"Column 1");
    xlsWriteLabel(0,1,"Column 2");
    xlsWriteLabel(0,2,"Column 3");
    xlsWriteLabel(0,3,"Column 4");
    $xlsRow = 1;
    foreach($somearray as $value)
    {
        xlsWriteNumber($xlsRow,0,"{Column Value 1}");
        xlsWriteLabel($xlsRow,1,"{Column Value 2}");
        xlsWriteLabel($xlsRow,2,"{Column Value 3}");
        xlsWriteLabel($xlsRow,3,"{Column Value 4}");
        $xlsRow++;
    }
    xlsEOF();
    exit; 
the problem is i want to add only 10 records per sheet and if the data is more i want to add a new sheet and start adding rows there. I am not able to find a way to add a new sheet. Any help will be appreciated.