06-11-2018 07:31 AM
Hello,
I have simple question, but I am afraid about answer, that there is no solution. I have a file control with several user custom patterns (eg. CSV file (*.csv), Excel file (*.xls), CSV tab file (*.csv). Each of this file patterns are standalone in file dialog (separate line). I would like to get an information when I choose file under file pattern label CSV tab file, because CSV File and CSV Tab file has a same pattern, but inside in the file they are different. And I want to start correct subVI to open this file correct. Have anybody a solution via file dialog? Thank you.
Solved! Go to Solution.
06-11-2018 07:40 AM
Hi
If the CSV file and CSV tab file have the same filetype then I don't there is any way to filter them separately.
However, if you are looking to select a particular subVI based upon the filetype then can you not open the CSV and maybe parse the contents of the file to decide whether it's a CSV or CSV tab file and then select the correct subVI as a result ?
06-11-2018 07:56 AM
I will solve my problem, that I am goging to use Windows .NET OpenFileDialog function, this will provide me an information about filter index and file path/name. Simple:-)
06-11-2018 10:24 AM
By definition, a file with a CSV extension (comma separated values) should not have tab separated values saved in it. Excel uses a .txt file extension for tab delimited file. However, for your application, you could save the files with a TSV extension so that the format of the document is clear to the users. There are other ways of handling this without invoking .NET.