Learn R Programming

XLConnect (version 1.0.7)

removePane-methods: Removing panes from worksheet

Description

Removes the split pane/freeze pane from the specified worksheet.

Usage

# S4 method for workbook,character
removePane(object,sheet)
# S4 method for workbook,numeric
removePane(object,sheet)

Arguments

object

The workbook to use

sheet

The name or index of the sheet from which to remove the split pane/freeze pane

Author

Nicola Lambiase
Mirai Solutions GmbH https://mirai-solutions.ch

References

How to create a freeze pane/split pane in Office 2007 https://support.microsoft.com/en-us/office/freeze-panes-to-lock-rows-and-columns-dab2ffc9-020d-4026-8121-67dd25f2508f?ocmsassetid=hp001217048&correlationid=b4f5baeb-b622-4487-a96f-514d2f00208a&ui=en-us&rs=en-us&ad=us

See Also

workbook createFreezePane createSplitPane

Examples

Run this code
if (FALSE) {
# Load workbook (create if not existing)
wb <- loadWorkbook("removePaneTest.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)

# Remove the split pane from Sheet1
removePane(wb, "Sheet1")

# Save workbook (this actually writes the file to disk). Now the workbook has no split pane.
saveWorkbook(wb)

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

Run the code above in your browser using DataLab