Read and write file example

Here I share a simple example for exporting data in ASCII ‘csv’ file format. The file is saved to the folder that is set up in the web browser.

Here is another example code. This one is reading / importing data in ASCII ‘csv’ file format. The csv file can be selected by the user from his or her local disk.

Browse file dialog displayed by File::GetFileFromUser()

You can paste these codes to a runnable class and it will work or copy from You can customize them to fit your needs. Use ‘TextStreamIo’ class instead of ‘AsciiStreamIo’ in case you want to use normal text files.

Leave a Reply

Your email address will not be published. Required fields are marked *