previousWorksheet::setMarginBottom (Previous) (Next) Worksheet::repeatColumnsnext

View this page in Last updated: Sun, 18 Oct 2009
English | Brazilian Portuguese | Chinese | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Turkish

Worksheet::repeatRows

Worksheet::repeatRows – Définit les lignes à répéter en haut de chaque page imprimée

Synopsis

require_once "Spreadsheet/Excel/Writer.php";

void Worksheet::repeatRows ( integer $first_row , integer $last_row=NULL )

Description

Définit les lignes à répéter en haut de chaque page imprimée.

Parameter

  • integer $first_row - Première ligne à répéter

  • integer $last_row - Dernière ligne à répéter. Optionnel

Note

This function can not be called statically.

Example

Exemple avec repeatRows()

<?php
require_once 'Spreadsheet/Excel/Writer.php';

$workbook = new Spreadsheet_Excel_Writer('test.xls');
$worksheet =& $workbook->addWorkSheet();
$worksheet->setColumn(0,0,100);
$worksheet->write(0,0,"99 Bottles Of Beer On The Wall- The Complete Lyrics");
// répète uniquement la première ligne
$worksheet->repeatRows(0);
for (
$i 99$i 0$i--)
{
    if (
$i 1) {
        
$next $i 1;
    }
    else {
        
$next "no more";
    }
    
$worksheet->write(100 $i,0,"$i Bottles of beer on the wall, $i bottles of beer, ".
                                 
"take one down, pass it around, ".
                                 
"$next bottles of beer on the wall.");
}
$workbook->close();
?>
previousWorksheet::setMarginBottom (Previous) (Next) Worksheet::repeatColumnsnext

Download Documentation Last updated: Sun, 18 Oct 2009
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: alexanderguevara@gmail.com
As pointman mentioned, i am having problems with this function.

Is there any workaround to make it work?

Regards
Note by: pointman@rsvs.net

If Excel complains your workbook is corrupt, do you want to recover, and you're using setVersion(8), try disabling repeatRows().

Using 0.91 and had this issue with Excel >= ver 2000 (all that was tested)