Excel -> shiny -> excel

Hello to everybody,

i have a idea and want to know if it is possibly with shiny. I want to create a process

  • shiny is installed on an aws system
  • upload an excel file with a sheet via shiny
  • take some values out of the excel file
  • calculate some kpi s via shiny with the values
  • write the kpi back to the excel file
  • give the possibility to the user to download the file with the calculated values

Do i have the possibility in shiny?

Thanks for your answer

yes. this sounds standard.
well apart from 'writing back into excel'.
excel is a microsoft produce and I havent found a good R library to write it (read it yes, write no
well some are good at writing fresh new excel, but havent found one good for modifying existing excel, they tend to corrupt or lose info from the little I tried).
so you may have to write out values in .csv or some other format.
but then you could make some excel vba to format it or whatever you need.


What you are trying to do certainly is possible, but as @nirgrahamuk mentioned, the performance would depend on what type of Excel file you are planning to use for upload.

A great way to get started is experiment with the openxlsl package. You can read, style and write Excel files with that.

Depending on how complex the formatting of the input is (plain Excel table vs.lots of markup, formulas and macros) the processing and output might be more complicated, but in my experience reading form most Excel tables is really easy for R. The package comes with two vignettes to help you get started if you want to do more complex stuff.

Hope this helps,

1 Like

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.