Excel in a Shiny app

1,528 views
Skip to first unread message

Cyndy Hart

unread,
Sep 3, 2013, 5:45:17 PM9/3/13
to shiny-...@googlegroups.com
My boss really loves the look of Shiny, but we both really wish it could deal with Excel workbook sheets in some way or other, as a web server on a remote machine.  Is there any plan to do this, OR, does anyone know of some clever workaround to make this do-able?

thanks!

Yihui Xie

unread,
Sep 3, 2013, 5:59:58 PM9/3/13
to shiny-...@googlegroups.com
Perhaps you need to elaborate what you mean by "deal with Excel
workbook sheets" -- do you want to upload and read Excel files into R,
or edit/update such data tables in a Shiny app? The former problem
should be easier to solve than the latter; there are a couple of R
packages to do that:
http://cran.r-project.org/doc/manuals/r-release/R-data.html#Reading-Excel-spreadsheets

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

Cyndy Hart

unread,
Sep 3, 2013, 6:02:19 PM9/3/13
to shiny-...@googlegroups.com

Cyndy Hart

unread,
Sep 3, 2013, 6:03:31 PM9/3/13
to shiny-...@googlegroups.com
I'm posting here in this group, as I want to enable users of our Shiny app to upload Excel files that the Shiny app can display the date from/do calculations on.  I wouldn't post a general R question here (unless it was intimately tied to Shiny as well).

Yihui Xie

unread,
Sep 3, 2013, 6:32:55 PM9/3/13
to shiny-...@googlegroups.com
No, it is not a general R question. I mean, will your Excel files be
read-only or you want to modify them in a Shiny app? It should not be
hard to read and display them in an app using renderTable() (or
display anything from calculations using the render*() functions). If
you also want to edit the files, it is trickier, since it will involve
a user interface, and I'm not yet aware of a ready-to-use UI widget
that supports editing tables.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


Cyndy Hart

unread,
Sep 3, 2013, 6:36:21 PM9/3/13
to shiny-...@googlegroups.com
Yihui:

I want users to be able to upload an Excel file to my Shiny server, and view that data, plot tat data, do statistics on that data, etc.  Inside my Shiny app.  I do not need to change the file at ALL.  But the users will not be on my network where the Shiny server is running.

It was my understanding Shiny could only read from input to a web browser, .csv files?

Yihui Xie

unread,
Sep 3, 2013, 7:05:09 PM9/3/13
to shiny-...@googlegroups.com
Data processing is done with R; you can do whatever you want, e.g. you
can read any files as long as you can find a package/function to do it
(read.csv() for CSV files, packages for Excel files to read Excel
files, ...). This part is orthogonal to Shiny.

What Shiny can do for you is to provide a user interface to upload the
files in the beginning (or other UI elements to provide input
options), and display results using the UI elements in the end.
Everything else in the middle depends on the power of R and you have
full freedom (in other words, that part is basically a general R
problem). I hope this is clearer now.

Regards,
Yihui
--
Yihui Xie <xiey...@gmail.com>
Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


Reply all
Reply to author
Forward
0 new messages