CSV export

Hello Guys!..

I have to export a view into CSV, i use below formula, it works fine.

@Command([FileExport]; “Comma Separated Value”; “c:\result.csv”)

But now i have to upgrade it a little bit i.e when user clicks button it has to prompt where to save (only directory) but the file name should be result.csv.

Please help me with editing the code…

Thanks in Advance

VJ

Subject: CSV export

Well, if you don’t need it to be “pretty” you could just add the following:

defaultfile := “c:\result.csv”;

loc := @Prompt([OkCancelEdit]; “Save As…”; “Enter Path and filename”; defaultfile);

loc := @If( @Len(loc) < 5; ans + “.csv”;

	@LowerCase(@Right(loc;4))=".csv"; loc;

	@Return("Bad File Name")

);

@Command([FileExport]; “Comma Separated Value”; loc )

Subject: RE: CSV export

I would add, look at @Prompt([LocalBrowse]…), but in addition, please consider not having an export view. There’s a facility here for exporting to CSV using script, which you can easily configure to contain the fields and computed values you would like. LotusScript also has more choices and control for file browsing dialogs.

Subject: RE: CSV export

Thanks Stephen,

Is there any way to give option to the user to select the path (browse) rather than entering the file path…

Thanks Again,

VJ