createFreezePane-methods: Creating a freeze pane on a worksheet

Description Usage Arguments Note Author(s) References See Also Examples

Description

Creates a freeze pane on a specified worksheet.

Usage

1
2
3
4
## S4 method for signature 'workbook,character'
createFreezePane(object, sheet, colSplit, rowSplit, leftColumn, topRow)
## S4 method for signature 'workbook,numeric'
createFreezePane(object, sheet, colSplit, rowSplit, leftColumn, topRow)

Arguments

object

The workbook to use

sheet

The name or index of the sheet on which to create a freeze pane

colSplit

Horizontal position of freeze (as column index or name)

rowSplit

Vertical position of freeze (as number of rows)

leftColumn

Left column (as column index or name) visible in right pane. If not specified, the default is leftColumn=colSplit

topRow

Top row (as index) visible in bottom pane. If not specified, the default is topRow=rowSplit

Note

To keep an area of a worksheet visible while you scroll to another area of the worksheet, you can lock specific rows or columns in one area by freezing or splitting panes.

When you freeze panes, you keep specific rows or columns visible when you scroll in the worksheet. For example, you might want to keep row and column labels visible as you scroll.

When you split panes, you create separate worksheet areas that you can scroll within, while rows or columns in the non-scrolled area remain visible.

Author(s)

Nicola Lambiase
Mirai Solutions GmbH http://www.mirai-solutions.com

References

How to create a freeze pane/split pane in Office 2007 http://office.microsoft.com/en-us/excel-help/freeze-or-lock-rows-and-columns-HP001217048.aspx

See Also

workbook createSplitPane removePane

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load workbook (create if not existing)
wb <- loadWorkbook("freezePaneTest.xlsx", create = TRUE)

# Create a worksheet named 'Sheet1'
createSheet(wb, name = "Sheet1")

# Create a freeze pane on Sheet1, using as reference position the 5th column and the 5th row,
# showing the 10th column as the leftmost visible one in the right pane
# and the 10th row as the top visible one in the bottom pane.
createFreezePane(wb, "Sheet1", 5, 5, 10, 10)

# Save workbook (this actually writes the file to disk)
saveWorkbook(wb)

Example output

Loading required package: XLConnectJars
OpenJDK 64-Bit Server VM warning: Can't detect initial thread stack location - find_vma failed
XLConnect 0.2-12 by Mirai Solutions GmbH [aut],
  Martin Studer [cre],
  The Apache Software Foundation [ctb, cph] (Apache POI, Apache Commons
    Codec),
  Stephen Colebourne [ctb, cph] (Joda-Time Java library),
  Graph Builder [ctb, cph] (Curvesapi Java library)
http://www.mirai-solutions.com ,
http://miraisolutions.wordpress.com
ZoneInfo: /usr/share/javazi/ZoneInfoMappings (Permission denied)
Warning message:
system call failed: Cannot allocate memory 

XLConnect documentation built on April 6, 2018, 1:03 a.m.