Import Function: How to detect that user has hit 'Cancel' button when selecting a file
I am trying to make sure that this event gets captured, but can't find a way to detect the 'cancel' button click when the user is selecting a file to import.
Also, if anyone knows how to get the file extension, e.g., .xls, or .xlsx, that would be great.
1) to detect the 'cancel' button, the script must have the step: Set Error Capture [ On ] and the last error returned is 1 ( User cancelled action )
2) to calculate the file extension, given its path:
v = Substitute ( path ; "." ; ¶ ) ;
GetValue ( v ; ValueCount ( v ) )