Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

taking an excel file as a input data from user in julia

Tags:

input

julia

I want to ask from users to load an excel file as an input data. this process must be done by opening a browsing window to select excel file. what can I do?

like image 502
user2154441 Avatar asked Dec 19 '25 16:12

user2154441


1 Answers

You can use open_dialog_native from Gtk.jl.

julia> open_dialog_native("Choose the input Excel file", GtkNullContainer(), ("*.xlsx",))
"/path/to/myfile.xlsx"

It opens the file chooser interface appropriate to the user's OS, and once the file is chosen, returns the chosen file's full path as a string.

The ("*.xlsx",) is a tuple that constrains what type of files are shown by default in the file chooser. (The GtkNullContainer() argument just specifies that you're not running this as part of an existing GTK app.)

Documentation here

like image 173
Sundar R Avatar answered Dec 21 '25 11:12

Sundar R