Worksheet::printRowColHeaders (Previous) (Next) Worksheet::setHPagebreaks

View this page in Last updated: Sun, 05 Oct 2008
English | Dutch | French | German | Hungarian | Japanese | Polish | Russian | Spanish | Plain HTML

Worksheet::fitToPages

Worksheet::fitToPages -- 縦横のページ数を保存する

説明

印刷領域が最大になるように縦横のページ数を保存します。 OpenOffice ではうまく動作しないようです。

パラメータ

  • integer $width - 印刷領域の最大幅 (ページ数)。

  • integer $height - 印刷領域の最大の高さ (ページ数)。

注意

この関数は、スタティックにコールする ことはできません。

Worksheet::printRowColHeaders (Previous) (Next) Worksheet::setHPagebreaks

Download Documentation Last updated: Sun, 05 Oct 2008
Do you think that something on this page is wrong? Please file a bug report or add a note.
User Notes:
Note by: luis.sv@gmail.com
It is working for me in OpenOffice.org 2.3.1 and Excel 2007

I'm calculating the number of pages with this code:

//total_rows is the total number of rows that I'm going to have in the spreadsheet
//total_rows_per_page is the number of rows that I want to print in each page

$total_pages=ceil($total_rows/$total_rows_per_page);

$worksheet->fitToPages(1,$total_pages);
//I put "1" in the first parameter because I just want to have a horizontal page


Regards,
Luis Rodrguez