XLConnect (version 1.0.1)

createSplitPane-methods: Creating a split pane on a worksheet

Description

Creates a split pane on a specified worksheet.

Usage

# S4 method for workbook,character
createSplitPane(object,sheet,xSplitPos,ySplitPos,leftColumn,topRow)
# S4 method for workbook,numeric
createSplitPane(object,sheet,xSplitPos,ySplitPos,leftColumn,topRow)

Arguments

object

The '>workbook to use

sheet

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

xSplitPos

Horizontal position of split (in 1/20th of a point)

ySplitPos

Vertical position of split (in 1/20th of a point)

leftColumn

Left column (as index or column name) visible in right pane

topRow

Top row visible in bottom pane

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 createFreezePane removePane

Examples

Run this code
# NOT RUN {
# Load workbook (create if not existing)
wb <- loadWorkbook("splitPaneTest.xlsx", create = TRUE)

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

# Create a split pane on Sheet1, with coordinates (10000, 5000) expressed as 1/20th of a point,
# 10 (-> J) as left column visible in right pane and 10 as top row visible in bottom pane 
createSplitPane(wb, "Sheet1", 10000, 5000, 10, 10)

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

# clean up 
file.remove("splitPaneTest.xlsx")
# }

Run the code above in your browser using DataLab