Your question is unclear, and the code is unrelated. Have you tried the openxlsx package? The function openxlsx::writeDataTable() can write a datalframe in an excel file. Inputting text data using a shiny app is a separate question and reading a csv file is a separate question. Please separate them out if you want replies.
what if I don't want the user to see my download handler? Also, I want to save everything when a condition is met. Like in reprex- when I have inserted the mobile number then it shall store the data and the UI shall close.
I show you how to write to the csv file continuously. you can remove the download button and downloadhandler.
you can have your own local permanent file.
you can arrange for things to happen when a condition is met, just you said before you wanted on every behaviour.
Really I think I've given you enough to attempt your own solution to your own issue.
Come back if you get stuck.
Thanks, I will do that!
Just one thing, in my textbox("message") I want to pass only numbers upto one decimal only. I am trying with-
round( grepl("^[3-9][0-9]+$", input$message ), 1).
But it's not working.
imput$message is a textInput (not a numericInput which is possible in shiny), therefore it will be of character/string type, so would need to convert to a numeric type to apply rounding.
look at the readr package.
there's probably a way for grepl to do it, but I avoid regex as much as possible.
You can start a fresh thread about gprel'ing numbers out of strings to 1dp. i expect its complicated because you might have to match whole numbers as well as decimals.
I recommend making a new thread for a new problem.
If you want people talented at regex to notice the question, then it should not shiny inthe title and tags, and you already marked a solution here so...
The round is never going to work unless its provided a number, the most you can hope the regex grepl could do is return the part of the string that has a number in it.
In my application, I have 8 details(like a registration form i.e name, phone number, address) to be stored in an excel/csv file. All are in If else condition, so in a session when I fill the first detail it shall store in the dataframe of a csv file. Like this all details to be filled in the csv file during run time and not after clicking an action button or submit button.