# Using Excel as a GUI for data entry

**URL:** <https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290>\
**Category:** General Usage\
**Tags:** xlsx, excel, gui\
**Created:** [November 5, 2024, 3:17pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290 "2024-11-05T15:17:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 5, 2024, 3:17pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290/1 "2024-11-05T15:17:34Z")

</div>

Can anyone tell me if the following is a ridiculous idea or not.

For interactive manual data entry, Excel (or one of its free spreadsheet equivalents) seems like a very versatile kind of “GUI”.

The following toy code works OK in a normal REPL outside of VS Code (due to the persistent readline() problem).

Is there a better way to pause the Julia flow than using `readline()` and waiting for the external program to finish?

> **Toy example using XLSX.jl**
>
> ```julia
> using XLSX
> 
> dir = pwd()
> tempfile = joinpath(dir, "tmpsheet.xlsx")
> 
> XLSX.openxlsx(tempfile, mode="rw") do xf
> sheet = xf[1]
> sheet["A1"] = "X"; sheet["B1"] = 0.0;
> sheet["A2"] = "Y"; sheet["B2"] = 0.0;
> end
> 
> while true
> run(`cmd /c start "" /b $(tempfile)`; wait=false)
> println("\nEXIT loop [Y]/N?")
> str = readline()
> str ∈ ("", "y", "Y") && break
> end
> X, Y = XLSX.readdata(tempfile, "Sheet1!B1:B6");
> println("X = $X, Y = $Y")	
> 
> ```

---

<div class="post-metadata">

**Author:** ![PeterSimon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petersimon/32/25193_2.png) [@PeterSimon](https://discourse.julialang.org/u/PeterSimon)\
**Post date:** [November 5, 2024, 3:29pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290/2 "2024-11-05T15:29:28Z")

</div>

I think it makes a lot of sense in an industrial setting where everyone has Excel. We used to do this at my former company, where a spreadsheet was used to enter setup data for plotting to PDFs a series of many antenna patterns. For us, the Excel file was prepared beforehand and its file name was passed as the single input to the main program.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [November 5, 2024, 3:53pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290/3 "2024-11-05T15:53:37Z")

</div>

Thanks Peter. The use case I have in mind is to use this in a menu-driven type of program - [see simple example here](https://www.javatpoint.com/menu-driven-programs-in-python), where the benefits are nicely highlighted.

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [November 5, 2024, 6:12pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290/4 "2024-11-05T18:12:16Z")

</div>

May be not exactly that, but related: GivEmXL.jl

---

<div class="post-metadata">

**Author:** ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Post date:** [November 5, 2024, 9:07pm UTC](https://discourse.julialang.org/t/using-excel-as-a-gui-for-data-entry/122290/5 "2024-11-05T21:07:48Z")

</div>

I use Term.jl and NativeFileDialog.jl for [my menu-driven program](https://github.com/nathanrboyer/ASME_Materials.jl).

 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/c/0cf07aab20962f50a75aa5ec9b7095df40cf4a20.png)
