Scripted file browser

I am exporting a csv file, making changes to it, then importing it back in.

I am using the following code to bring the csv back in. Where do I find information on creating a file browser so I do not always have to have the file saved as a specific name, with a specific path?

Below is my current code:

#Specify file path
file_path = “C:\reciperesults.csv”
#Read in the file as a string
data_string = system.file.readFileAsString(file_path)
#Convert the string to a dataset and store in a variable
data = system.dataset.fromCSV(data_string)
#Assign the dataset to a table
event.source.parent.getComponent(‘New Recipe Creation Table’).data = data

Hi Joe, welcome to the forums! :slight_smile:
system.file.saveFile() is the function you’re looking for.

#Specify file path file_path = system.file.saveFile("reciperesults.csv") if filepath != None: #Read in the file as a string data_string = system.file.readFileAsString(file_path) #Convert the string to a dataset and store in a variable data = system.dataset.fromCSV(data_string) #Assign the dataset to a table event.source.parent.getComponent('New Recipe Creation Table').data = data

great! It works well, thank you. I am new to ignition and to python.

I had one issue where you used filepath, instead of file_path. Good exercise for me to interpret the error message though!!