File: //usr/local/share/man/man3/Spreadsheet::ParseExcel::Worksheet.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "Spreadsheet::ParseExcel::Worksheet 3"
.TH Spreadsheet::ParseExcel::Worksheet 3 "2014-03-18" "perl v5.26.3" "User Contributed Perl Documentation"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SS "\fBget_tab_color()\fP"
.IX Subsection "get_tab_color()"
Return color index of tab, or undef if not set.
.SS "\fBis_sheet_hidden()\fP"
.IX Subsection "is_sheet_hidden()"
Return true if sheet is hidden
.SS "is_row_hidden($row)"
.IX Subsection "is_row_hidden($row)"
In scalar context, return true if \f(CW$row\fR is hidden
In array context, return an array whose elements are true
if the corresponding row is hidden.
.SS "is_col_hidden($col)"
.IX Subsection "is_col_hidden($col)"
In scalar context, return true if \f(CW$col\fR is hidden
In array context, return an array whose elements are true
if the corresponding column is hidden.
.SH "NAME"
Spreadsheet::ParseExcel::Worksheet \- A class for Worksheets.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
See the documentation for Spreadsheet::ParseExcel.
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This module is used in conjunction with Spreadsheet::ParseExcel. See the documentation for Spreadsheet::ParseExcel.
.SH "Methods"
.IX Header "Methods"
The \f(CW\*(C`Spreadsheet::ParseExcel::Worksheet\*(C'\fR class encapsulates the properties of an Excel worksheet. It has the following methods:
.PP
.Vb 10
\& $worksheet\->get_cell()
\& $worksheet\->row_range()
\& $worksheet\->col_range()
\& $worksheet\->get_name()
\& $worksheet\->get_h_pagebreaks()
\& $worksheet\->get_v_pagebreaks()
\& $worksheet\->get_merged_areas()
\& $worksheet\->get_row_heights()
\& $worksheet\->get_col_widths()
\& $worksheet\->get_default_row_height()
\& $worksheet\->get_default_col_width()
\& $worksheet\->get_header()
\& $worksheet\->get_footer()
\& $worksheet\->get_margin_left()
\& $worksheet\->get_margin_right()
\& $worksheet\->get_margin_top()
\& $worksheet\->get_margin_bottom()
\& $worksheet\->get_margin_header()
\& $worksheet\->get_margin_footer()
\& $worksheet\->get_paper()
\& $worksheet\->get_start_page()
\& $worksheet\->get_print_order()
\& $worksheet\->get_print_scale()
\& $worksheet\->get_fit_to_pages()
\& $worksheet\->is_portrait()
\& $worksheet\->is_centered_horizontally()
\& $worksheet\->is_centered_vertically()
\& $worksheet\->is_print_gridlines()
\& $worksheet\->is_print_row_col_headers()
\& $worksheet\->is_print_black_and_white()
\& $worksheet\->is_print_draft()
\& $worksheet\->is_print_comments()
.Ve
.ie n .SS "get_cell($row, $col)"
.el .SS "get_cell($row, \f(CW$col\fP)"
.IX Subsection "get_cell($row, $col)"
Return the \*(L"Cell\*(R" object at row \f(CW$row\fR and column \f(CW$col\fR if it is defined. Otherwise returns undef.
.PP
.Vb 1
\& my $cell = $worksheet\->get_cell($row, $col);
.Ve
.SS "\fBrow_range()\fP"
.IX Subsection "row_range()"
Returns a two-element list \f(CW\*(C`($min, $max)\*(C'\fR containing the minimum and maximum defined rows in the worksheet. If there is no row defined \f(CW$max\fR is smaller than \f(CW$min\fR.
.PP
.Vb 1
\& my ( $row_min, $row_max ) = $worksheet\->row_range();
.Ve
.SS "\fBcol_range()\fP"
.IX Subsection "col_range()"
Returns a two-element list \f(CW\*(C`($min, $max)\*(C'\fR containing the minimum and maximum of defined columns in the worksheet. If there is no column defined \f(CW$max\fR is smaller than \f(CW$min\fR.
.PP
.Vb 1
\& my ( $col_min, $col_max ) = $worksheet\->col_range();
.Ve
.SS "\fBget_name()\fP"
.IX Subsection "get_name()"
The \f(CW\*(C`get_name()\*(C'\fR method returns the name of the worksheet.
.PP
.Vb 1
\& my $name = $worksheet\->get_name();
.Ve
.SS "\fBget_h_pagebreaks()\fP"
.IX Subsection "get_h_pagebreaks()"
The \f(CW\*(C`get_h_pagebreaks()\*(C'\fR method returns an array ref of row numbers where a horizontal page break occurs.
.PP
.Vb 1
\& my $h_pagebreaks = $worksheet\->get_h_pagebreaks();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if there are no pagebreaks.
.SS "\fBget_v_pagebreaks()\fP"
.IX Subsection "get_v_pagebreaks()"
The \f(CW\*(C`get_v_pagebreaks()\*(C'\fR method returns an array ref of column numbers where a vertical page break occurs.
.PP
.Vb 1
\& my $v_pagebreaks = $worksheet\->get_v_pagebreaks();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if there are no pagebreaks.
.SS "\fBget_merged_areas()\fP"
.IX Subsection "get_merged_areas()"
The \f(CW\*(C`get_merged_areas()\*(C'\fR method returns an array ref of cells that are merged.
.PP
.Vb 1
\& my $merged_areas = $worksheet\->get_merged_areas();
.Ve
.PP
Each merged area is represented as follows:
.PP
.Vb 1
\& [ $start_row, $start_col, $end_row, $end_col]
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if there are no merged areas.
.SS "\fBget_row_heights()\fP"
.IX Subsection "get_row_heights()"
The \f(CW\*(C`get_row_heights()\*(C'\fR method returns an array_ref of row heights in scalar context,
and an array in list context.
.PP
.Vb 1
\& my $row_heights = $worksheet\->get_row_heights();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_col_widths()\fP"
.IX Subsection "get_col_widths()"
The \f(CW\*(C`get_col_widths()\*(C'\fR method returns an array_ref of column widths in scalar context,
and an array in list context.
.PP
.Vb 1
\& my $col_widths = $worksheet\->get_col_widths();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_default_row_height()\fP"
.IX Subsection "get_default_row_height()"
The \f(CW\*(C`get_default_row_height()\*(C'\fR method returns the default row height for the worksheet. Generally 12.75.
.PP
.Vb 1
\& my $default_row_height = $worksheet\->get_default_row_height();
.Ve
.SS "\fBget_default_col_width()\fP"
.IX Subsection "get_default_col_width()"
The \f(CW\*(C`get_default_col_width()\*(C'\fR method returns the default column width for the worksheet. Generally 8.43.
.PP
.Vb 1
\& my $default_col_width = $worksheet\->get_default_col_width();
.Ve
.SS "\fBget_header()\fP"
.IX Subsection "get_header()"
The \f(CW\*(C`get_header()\*(C'\fR method returns the worksheet header string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for \fBset_header()\fR.
.PP
.Vb 1
\& my $header = $worksheet\->get_header();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_footer()\fP"
.IX Subsection "get_footer()"
The \f(CW\*(C`get_footer()\*(C'\fR method returns the worksheet footer string. This string can contain control codes for alignment and font properties. Refer to the Excel on-line help on headers and footers or to the Spreadsheet::WriteExcel documentation for \fBset_header()\fR.
.PP
.Vb 1
\& my $footer = $worksheet\->get_footer();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_margin_left()\fP"
.IX Subsection "get_margin_left()"
The \f(CW\*(C`get_margin_left()\*(C'\fR method returns the left margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_left = $worksheet\->get_margin_left();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_margin_right()\fP"
.IX Subsection "get_margin_right()"
The \f(CW\*(C`get_margin_right()\*(C'\fR method returns the right margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_right = $worksheet\->get_margin_right();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_margin_top()\fP"
.IX Subsection "get_margin_top()"
The \f(CW\*(C`get_margin_top()\*(C'\fR method returns the top margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_top = $worksheet\->get_margin_top();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_margin_bottom()\fP"
.IX Subsection "get_margin_bottom()"
The \f(CW\*(C`get_margin_bottom()\*(C'\fR method returns the bottom margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_bottom = $worksheet\->get_margin_bottom();
.Ve
.PP
Returns \f(CW\*(C`undef\*(C'\fR if the property isn't set.
.SS "\fBget_margin_header()\fP"
.IX Subsection "get_margin_header()"
The \f(CW\*(C`get_margin_header()\*(C'\fR method returns the header margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_header = $worksheet\->get_margin_header();
.Ve
.PP
Returns a default value of 0.5 if not set.
.SS "\fBget_margin_footer()\fP"
.IX Subsection "get_margin_footer()"
The \f(CW\*(C`get_margin_footer()\*(C'\fR method returns the footer margin of the worksheet in inches.
.PP
.Vb 1
\& my $margin_footer = $worksheet\->get_margin_footer();
.Ve
.PP
Returns a default value of 0.5 if not set.
.SS "\fBget_paper()\fP"
.IX Subsection "get_paper()"
The \f(CW\*(C`get_paper()\*(C'\fR method returns the printer paper size.
.PP
.Vb 1
\& my $paper = $worksheet\->get_paper();
.Ve
.PP
The value corresponds to the formats shown below:
.PP
.Vb 10
\& Index Paper format Paper size
\& ===== ============ ==========
\& 0 Printer default \-
\& 1 Letter 8 1/2 x 11 in
\& 2 Letter Small 8 1/2 x 11 in
\& 3 Tabloid 11 x 17 in
\& 4 Ledger 17 x 11 in
\& 5 Legal 8 1/2 x 14 in
\& 6 Statement 5 1/2 x 8 1/2 in
\& 7 Executive 7 1/4 x 10 1/2 in
\& 8 A3 297 x 420 mm
\& 9 A4 210 x 297 mm
\& 10 A4 Small 210 x 297 mm
\& 11 A5 148 x 210 mm
\& 12 B4 250 x 354 mm
\& 13 B5 182 x 257 mm
\& 14 Folio 8 1/2 x 13 in
\& 15 Quarto 215 x 275 mm
\& 16 \- 10x14 in
\& 17 \- 11x17 in
\& 18 Note 8 1/2 x 11 in
\& 19 Envelope 9 3 7/8 x 8 7/8
\& 20 Envelope 10 4 1/8 x 9 1/2
\& 21 Envelope 11 4 1/2 x 10 3/8
\& 22 Envelope 12 4 3/4 x 11
\& 23 Envelope 14 5 x 11 1/2
\& 24 C size sheet \-
\& 25 D size sheet \-
\& 26 E size sheet \-
\& 27 Envelope DL 110 x 220 mm
\& 28 Envelope C3 324 x 458 mm
\& 29 Envelope C4 229 x 324 mm
\& 30 Envelope C5 162 x 229 mm
\& 31 Envelope C6 114 x 162 mm
\& 32 Envelope C65 114 x 229 mm
\& 33 Envelope B4 250 x 353 mm
\& 34 Envelope B5 176 x 250 mm
\& 35 Envelope B6 176 x 125 mm
\& 36 Envelope 110 x 230 mm
\& 37 Monarch 3.875 x 7.5 in
\& 38 Envelope 3 5/8 x 6 1/2 in
\& 39 Fanfold 14 7/8 x 11 in
\& 40 German Std Fanfold 8 1/2 x 12 in
\& 41 German Legal Fanfold 8 1/2 x 13 in
\& 256 User defined
.Ve
.PP
The two most common paper sizes are \f(CW\*(C`1 = "US Letter"\*(C'\fR and \f(CW\*(C`9 = A4\*(C'\fR. Returns 9 by default.
.SS "\fBget_start_page()\fP"
.IX Subsection "get_start_page()"
The \f(CW\*(C`get_start_page()\*(C'\fR method returns the page number that printing will start from.
.PP
.Vb 1
\& my $start_page = $worksheet\->get_start_page();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBget_print_order()\fP"
.IX Subsection "get_print_order()"
The \f(CW\*(C`get_print_order()\*(C'\fR method returns 0 if the worksheet print \*(L"page order\*(R" is \*(L"Down then over\*(R" (the default) or 1 if it is \*(L"Over then down\*(R".
.PP
.Vb 1
\& my $print_order = $worksheet\->get_print_order();
.Ve
.SS "\fBget_print_scale()\fP"
.IX Subsection "get_print_scale()"
The \f(CW\*(C`get_print_scale()\*(C'\fR method returns the workbook scale for printing. The print scale factor can be in the range 10 .. 400.
.PP
.Vb 1
\& my $print_scale = $worksheet\->get_print_scale();
.Ve
.PP
Returns 100 by default.
.SS "\fBget_fit_to_pages()\fP"
.IX Subsection "get_fit_to_pages()"
The \f(CW\*(C`get_fit_to_pages()\*(C'\fR method returns the number of pages wide and high that the printed worksheet page will fit to.
.PP
.Vb 1
\& my ($pages_wide, $pages_high) = $worksheet\->get_fit_to_pages();
.Ve
.PP
Returns (0, 0) if the property isn't set.
.SS "\fBis_portrait()\fP"
.IX Subsection "is_portrait()"
The \f(CW\*(C`is_portrait()\*(C'\fR method returns true if the worksheet has been set for printing in portrait mode.
.PP
.Vb 1
\& my $is_portrait = $worksheet\->is_portrait();
.Ve
.PP
Returns 0 if the worksheet has been set for printing in horizontal mode.
.SS "\fBis_centered_horizontally()\fP"
.IX Subsection "is_centered_horizontally()"
The \f(CW\*(C`is_centered_horizontally()\*(C'\fR method returns true if the worksheet has been centered horizontally for printing.
.PP
.Vb 1
\& my $is_centered_horizontally = $worksheet\->is_centered_horizontally();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_centered_vertically()\fP"
.IX Subsection "is_centered_vertically()"
The \f(CW\*(C`is_centered_vertically()\*(C'\fR method returns true if the worksheet has been centered vertically for printing.
.PP
.Vb 1
\& my $is_centered_vertically = $worksheet\->is_centered_vertically();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_print_gridlines()\fP"
.IX Subsection "is_print_gridlines()"
The \f(CW\*(C`is_print_gridlines()\*(C'\fR method returns true if the worksheet print \*(L"gridlines\*(R" option is turned on.
.PP
.Vb 1
\& my $is_print_gridlines = $worksheet\->is_print_gridlines();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_print_row_col_headers()\fP"
.IX Subsection "is_print_row_col_headers()"
The \f(CW\*(C`is_print_row_col_headers()\*(C'\fR method returns true if the worksheet print \*(L"row and column headings\*(R" option is turned on.
.PP
.Vb 1
\& my $is_print_row_col_headers = $worksheet\->is_print_row_col_headers();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_print_black_and_white()\fP"
.IX Subsection "is_print_black_and_white()"
The \f(CW\*(C`is_print_black_and_white()\*(C'\fR method returns true if the worksheet print \*(L"black and white\*(R" option is turned on.
.PP
.Vb 1
\& my $is_print_black_and_white = $worksheet\->is_print_black_and_white();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_print_draft()\fP"
.IX Subsection "is_print_draft()"
The \f(CW\*(C`is_print_draft()\*(C'\fR method returns true if the worksheet print \*(L"draft\*(R" option is turned on.
.PP
.Vb 1
\& my $is_print_draft = $worksheet\->is_print_draft();
.Ve
.PP
Returns 0 if the property isn't set.
.SS "\fBis_print_comments()\fP"
.IX Subsection "is_print_comments()"
The \f(CW\*(C`is_print_comments()\*(C'\fR method returns true if the worksheet print \*(L"comments\*(R" option is turned on.
.PP
.Vb 1
\& my $is_print_comments = $worksheet\->is_print_comments();
.Ve
.PP
Returns 0 if the property isn't set.
.SH "AUTHOR"
.IX Header "AUTHOR"
Current maintainer 0.60+: Douglas Wilson dougw@cpan.org
.PP
Maintainer 0.40\-0.59: John McNamara jmcnamara@cpan.org
.PP
Maintainer 0.27\-0.33: Gabor Szabo szabgab@cpan.org
.PP
Original author: Kawai Takanori kwitknr@cpan.org
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 2014 Douglas Wilson
.PP
Copyright (c) 2009\-2013 John McNamara
.PP
Copyright (c) 2006\-2008 Gabor Szabo
.PP
Copyright (c) 2000\-2006 Kawai Takanori
.PP
All rights reserved.
.PP
You may distribute under the terms of either the \s-1GNU\s0 General Public License or the Artistic License, as specified in the Perl \s-1README\s0 file.