Home » Code Snippets » Read Csv file from dialog box

Read Csv file from dialog box

Calendar

May 2014
M T W T F S S
« Apr   Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  
Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s

%d bloggers like this: