Skip to content

Freezing does not work in Excel file with around 15 sheets #550

@Rengervn

Description

@Rengervn

Expected Behavior

I fill an excel file in a loop over around 15 sheets with data. At the end of each sheet, I add a freezePane command.
freezePane(wb, sn, firstActiveRow = 4, firstActiveCol = 7)
and after the loop save it.
I expect the sheets are frozen at 4,7

Actual Behavior

No freezing takes place

Steps to Reproduce the Problem

(please attach an example xlsx file if possible)

Just run the following code
wb <- loadWorkbook(file = "temp.xlsx")
sectors <- getSheetNames(file = "temp.xlsx")
for (sn in sectors) {
freezePane(wb, sn, firstActiveRow = 4, firstActiveCol = 7)
}
saveWorkbook(wb, file = "temp.xlsx", overwrite = T)

Cheers
Renger

sessionInfo()

  • Version of openxlsx: 4.2.5.2
  • Version of R: 4.0.4
    temp.xlsx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions