I am currently working on a Shiny app in R that incorporates an rhandsontable element. I would like to add a feature where a user can specify a cell range (e.g., "A1:B2") in a text input field, and the rhandsontable would then select that range on the table.
Here's a simplified version of my current code:
library(shiny)
library(rhandsontable)
ui <- fluidPage(
textInput("cell_range", "Enter cell range:"),
rHandsontableOutput("table")
)
server <- function(input, output) {
output$table <- renderRHandsontable({
df <- data.frame(A = 1:5, B = 6:10, C = 11:15)
rhandsontable(df)
})
}
shinyApp(ui = ui, server = server)
This is the expected outcome:
I'm not sure how to proceed with the cell range selection part. I've looked through the rhandsontable documentation but couldn't find a straightforward way to do this.

Here is a way but it does not allow to enter an Excel cell range. Instead, you have to enter the cell range as
rowStart:columnStart:rowEnd:columnEnd.If you want to trigger the range selection with a button rather than a press on the Enter key, you can do: