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
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")