Read Csv file from dialog box

here is the code sample to read the file from dialog .

Dialog dialog;
Filename filename;
DialogField dialogFilename;
str myCsvFile;
;
dialog = new dialog();
dialog.caption(“Choose a file”);
dialogFilename = dialog.addField(extendedTypeStr(FilenameOpen));
dialog.run();

if(dialog.closedOk())
{
filename = dialogFileName.value();
#define.file(filename)
myCsvFile = #file; // myCsvFile has the selected file path
info(myCsvFile);

//here enter logic for your csv file

//you can find the link to read the csv file from here

}

Dialog

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s