CSV to Word Report in R Shiny: The Little App I Built in 2024 (and Almost Lost)

CSV to Word Report in R Shiny: The Little App I Built in 2024 (and Almost Lost)

I built a small app in 2024 that turns a CSV file into a finished Word report.

Last week I found out it was ten days from being deleted forever. Code, all of it. Gone.

Everyone would tell me to let it go. Nobody uses it. But a tool nobody uses is still proof of what you can build — and proof is the whole business.

I build websites and monthly reports for small businesses now. The reporting half comes straight from ten years as a SAS programmer and analyst, turning raw data into reports people could actually use. This little app is that work in miniature: data in, finished report out, no manual formatting in between. If your business runs on spreadsheets and someone still retypes numbers into Word by hand, this is the kind of thing I build to stop that.

What does the app actually do?

You upload a CSV or TSV file, pick one grouping variable and the variables you want to compare, and it hands you a formatted Word document with a comparison table.

That is the whole job. One screen to upload. One screen to choose. One button to preview, one to download.

Here is what happens underneath, because the details are the point. The app reads your file with R, then builds the comparison table with a package called atable — it lines up your variables side by side by group, the way a descriptive-statistics table should look. A second package, flextable, formats that table. A third, officer, writes it into a real Word document with your title as the heading. Preview runs the document through Pandoc and shows it to you in the browser before you download anything.

The app is 175 lines of code and eight R packages. I deployed it on July 31, 2024 and last updated it in April 2025. The title on the page still has a little :D in it. That tells you when in my life it was built — late nights, learning R after a decade of SAS, having fun with it.

It does one thing, and it does it cleanly. No charts. No database. No login. Upload, choose, download.

This app vs. the usual ways to get a comparison table

Most small businesses get a grouped comparison table one of three ways. Here is how they stack up.

Way to get the table Time per report Formatting Repeatable
Copy and paste into Word by hand An hour or more Depends on who is typing No — rebuilt every time
Excel pivot tables 20 to 30 minutes Decent, but you fight it Partly — if the file survives
This app Minutes Same format every time Yes — same steps, same output
Hiring someone each time Days of waiting Good Only if they keep notes

The manual route is the one I see most. Someone exports data, pastes it into Word, fixes the columns, retypes the headings, and does it all again next month. The work is not hard. It is just slow, and slow work done by hand is where errors creep in.

The app removes the handwork. The numbers come straight from the file. The format is the same every single run. That is the entire idea: the report is the product, and the product should not depend on who is awake to type it.

How to use it

Five steps, in the browser. Nothing to install.

  1. Open the app and upload your CSV or TSV file. That is the only input it takes.
  2. Give your report a title and pick your grouping variable — the one column that splits your data into groups, like a location, a treatment arm, or a category.
  3. Pick the variables you want to compare across those groups. As many as you need.
  4. Hit Preview Results. The app builds the Word document and shows you the table in the browser first, so you see exactly what you are getting.
  5. Hit Download Word Document. It saves under the filename you chose.

If your data has no grouping column, the app has nothing to compare — that is the one requirement. One column that groups, the rest to compare. That shape fits most business data: sales by store, jobs by crew, responses by month.

Why I built it

The pattern is the one I used for ten years. In clinical SAS work, most of the job was descriptive-statistics tables: take a dataset, split it by group, summarize each variable, format the result so a person can read it. Same shape every time, different data every time.

After a decade of that, the shape is automatic. When I started learning R, I built the smallest version of it I could: a tool that takes a file and gives back a formatted table. Not for a client. Not for a study. For me, to prove I could build the thing I had spent ten years producing by hand.

That is why I saved it last week instead of letting it go. Posit is deleting shinyapps.io apps unused since May 30, 2025, starting November 30, 2026 — source code included. Mine had been asleep for months. I downloaded the full bundle, all 91 KB of code and package list, and opened the live page until it woke up and ran. Ten minutes. The full story is in my other post on the rescue.

Old tools are not clutter. They are proof of what you can build. A data tool you built two years ago says more about your work than a dozen posts saying you do data.

What this means for a small business

You do not need a Shiny app. You need the thing the app represents: a report that builds itself from your data, the same way, every time.

That is the work behind my Monthly Report Runs and my PDF and Excel reports. A business hands me its numbers — sales, jobs, customers, whatever lives in a spreadsheet — and gets back a finished report it can actually read and use. Same pattern as the app. Different data, same discipline: numbers in, formatted answers out, no retyping.

If your month ends with someone pasting numbers into Word by hand, that is a problem worth fixing. The fix does not have to be big. It has to be repeatable.

Frequently asked questions

Do I need R or SAS to use the app? No. It runs in the browser. You upload a file and download a Word document. The R code runs on the server, not on your machine.

What kind of data works in it? Any CSV or TSV file with a grouping column — one column that splits the rows into groups, like store, month, or category — plus the variables you want to compare across those groups.

Can it make charts? No. It makes one thing: a formatted comparison table in a Word document. If you need charts, that is a different tool — and one I can build too.

Will the app stay online? It is on a free shinyapps.io account, which migrates to Posit Connect Cloud starting January 28, 2027. I have the full bundle saved, so the code is safe either way. It sleeps after fifteen minutes with no use, which is normal — sleeping is not deleted.

Key takeaways

  • The app turns a CSV or TSV into a formatted Word comparison table in five steps: upload, group, compare, preview, download.
  • It is 175 lines of R, built on the same grouped-table pattern I used for ten years in SAS work.
  • I saved it from the November 30 shinyapps.io deletion with a ten-minute rescue: bundle downloaded, app woken up.
  • The real lesson is not the app. It is that a report should build itself from the data, the same way, every time.

Related reading: Shinyapps.io Is Deleting Inactive Apps Nov 30 — I Saved Mine in 10 Minutes

If your business runs on old spreadsheets, old reports, or a tool nobody remembers building, I can take a look at it and tell you plainly whether it is worth saving or rebuilding. That is the same data work I did for ten years — now aimed at small businesses instead of clinical trials.

Want this done for you? Get 2 free sample posts — written in your voice, on your Google profile, this week.

2026-11-20