LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to spread sheet file generates file type unknown to windows 7.

Solved!
Go to solution

Hi all, I am using the "Write to Spreadsheet File" Vi to write data to text files. This data can be read by any text editor, such as MS notepad, or excel. The problem is that

windows sees these files as being of an unknown type, and I have to explicitly tell windows what program to use to open these files. Also, for some reason the

"Always use the selected program to open this kind of file" box is greyed out. So I can't assign a file type to these files.

 

Has anyone else encountered this problem? Do you know how to fix it? And what type of files does "Write to Spreadsheet File" generate?

 

Thanks for your help,

0 Kudos
Message 1 of 8
(3,276 Views)

Seems that you haven't given the file extension when you give the file path and file name so thats why it shows as unknown file type. By default Spreadsheet vi generated tab delimited files.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 8
(3,275 Views)
Solution
Accepted by topic author edCubed

What extension are you using to create your files?  I agree that it sounds like you are not supplying a file extension.  Append a ".txt" to your file names before writing and Windows will play more nicely with you.  Or if you are using a comma as the delimiter, use ".csv".


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 8
(3,262 Views)

Thanks for your replies. I'll try appending a file extension to the files being written and see if that helps.

 

Smiley Happy

 

 

0 Kudos
Message 4 of 8
(3,246 Views)

Yup, it worked. I was used to using "write to measurement file" which automatically assigns a file type.

 

Thanks again,

0 Kudos
Message 5 of 8
(3,237 Views)

Is there a way to set it so that when a user is prompted for a file name the file type is automatically set to .txt? Would save countless needless ".txt" appends to file names.

 

I know I could check the filename afterward and add a ".txt" if it was missing but it would be nice if the user had that feedback ahead of time.

 

Thanks

Chuck

0 Kudos
Message 6 of 8
(3,206 Views)

Like this...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 8
(3,201 Views)

Thank you, that is very helpful. I generally avoid the Express VIs but in this case (and other cases of user prompts, I have noticed) they come in useful.

 

Chuck

0 Kudos
Message 8 of 8
(3,198 Views)