Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freezePane(firstActiveRow, firstActiveCol) not working as expected #460

Open
gabrielwolfson opened this issue Jan 11, 2024 · 1 comment
Open
Labels

Comments

@gabrielwolfson
Copy link

Describe the bug
When freezing excel rows and columns, the user must either specify 'firstRow = TRUE' and 'firstCol = TRUE' or provide 'firstActiveRow' and 'firstActiveCol' arguments. When using 'firstRow = TRUE' combined with 'firstActiveCol' or 'firstActiveRow' combined with 'firstCol = TRUE', the 'firstActive_x' argument is ignored.

To Reproduce
df <- mtcars

wb <- createWorkbook()

addWorksheet(wb = wb, sheetName = "Sheet 1")

writeData(wb = wb, sheet = "Sheet 1", x = df)

###works:

#example 1: firstRow = TRUE, firstCol = TRUE
freezePane(wb = wb, sheet = "Sheet 1",
firstRow = TRUE,
firstCol = TRUE)

openXL(file = wb)

#example 2: firstActiveRow = 3, firstActiveCol = 4
freezePane(wb = wb, sheet = "Sheet 1",
firstActiveCol = 4,
firstActiveRow = 3)

openXL(file = wb)

###does not work:

#example 3: firstRow = TRUE, firstActiveCol = 4
freezePane(wb = wb, sheet = "Sheet 1",
firstRow = TRUE,
firstActiveCol = 4)

openXL(file = wb) #firstActiveCol does not freeze cols

#example 4: firstActiveRow = 3, firstCol = TRUE
freezePane(wb = wb, sheet = "Sheet 1",
firstActiveRow = 3,
firstCol = TRUE)

openXL(file = wb) #firstActiveRow does not freeze rows

Expected behavior
In example 3: first row and columns 1-3 should be frozen (only first row is frozen)
in example 4: first column and rows 1-2 should be frozen (only first column is frozen)

Example files
example_1.xlsx
example_2.xlsx
example_3.xlsx
example_4.xlsx

Additional context
Given the easy workaround, it's not critical that this be addressed on the back-end. It might be simpler to include a note in the documentation.

Copy link

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant