Skip to content

Set last active cell in the book #756

Answered by JanMarvin
lz1nwm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @lz1nwm ,

that's not possible via argument, but you can do it like this:

wb <- wb_workbook()$add_worksheet()
wb$worksheets[[1]]$freezePane <- "<selection activeCell=\"G9\" sqref=\"G9\"/>"
wb$worksheets[[1]]$sheetViews <- "<sheetViews><sheetView tabSelected=\"1\" topLeftCell=\"B2\" workbookViewId=\"0\"/></sheetViews>"
if (interactive()) wb$open()

To set the top left cell, you'd have to modify sheetViews, but I'm typing on the smartphone.

Let me know if this works.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@JanMarvin
Comment options

@Jeff-White-AZ
Comment options

@JanMarvin
Comment options

Answer selected by JanMarvin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants