Showing results for 
Search instead for 
Do you mean 

Browse for Excel file

[ Edited ]

Hello everyone!

I am working on some automation that will require specifying an Excel file for read and write.

Is it possible to browse for Excel file using NativeFileBrowser from UI Styler, or is it restricted only to PRT file format? Shall I go for Windows forms instead?


Re: Browse for Excel file

Yes it is possible. You can even add a filter in the file browser to accept only .xls format. The FileSelection class has a SetFileter method.



Re: Browse for Excel file

Thank you, got it. 


Is it possible to use this browser to set the name of the new file that does not yet exists? It works if I point to the existing file, but it returns error if file does not exist. What if I need to create a new file? Is it possible?

Re: Browse for Excel file

Unfortunately, it is not possible to set a non-existing name. This is a capability that is sorely needed. Please file an IR with GTAC requesting this to make your vote heard.


A Block Styler Workaround is to use 2 blocks: a FolderBrowser to select the folder and a String to specify the filename. This works if you are always creating a new file, but is a bit ugly if you want to have the possibility of new or existing.


Other alternatives are the .NET System.Windows.Forms.FileDialog class. It contains methods for specifying paths, extensions, existence checking, etc.