LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving file error

Hello I got a problem with saving file. After I run the program, I try to open the file I want to save in but there is an error about "format file" or something like that. I am not pretty sure what is wrong exactly. Could you please take a look at my programming and define where the errors are?

 

Thanks

0 Kudos
Message 1 of 17
(3,693 Views)

HI,

 

It's difficult to know what your error is without an error code! (next time take a quick screenshot Smiley Wink)

 

-CC 

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 2 of 17
(3,680 Views)

[edit: Duplicated post for some reason! Smiley Frustrated]

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 3 of 17
(3,680 Views)

Like Chrissy said, take a screenshot or copy the text, it would help.

 

Also, I would help more, but I can't open the VI. I'm using version 9. If you can save it in version 9 I can have a look at the VI.

0 Kudos
Message 4 of 17
(3,676 Views)

Hi Bombbooo,

 

well, you could also check the error numbers. The error indicator will also explain them - just right-click it...

 

One guess: You explicitely "open" a file. When the file does not exist you will get an error...

 

- You don't need to open the file every iteration.

- You don't need to close the file every iteration.

- You don't need an additional wait statement in the file saving loop.

- You could clean up your code even more as shwon in your older thread...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 17
(3,673 Views)

I just want to make one point clear are you trying to open the file in LabVIEW or manual. In your code I dont see any file extension that may create a file which windows will not be able to findout. Please clarify these points then we can come to a solution and find out where the exact issue is.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 17
(3,664 Views)

I want to open the file in excel. I already put the excel file that I created into the file path. but there was the error. I can only open it in Notepad.  You can try to put into youe excel file.

 

Thanks

0 Kudos
Message 7 of 17
(3,658 Views)

You are not actually creating an excel file no matter what file extension you give it. Excel can open certain types of text files. The Write to Spreadsheet function creates value delimited files that Excel can open. You can use that or fix your program to add a delimiter between the timestamp and the first value.

Message 8 of 17
(3,649 Views)

Ahh right, you can't simply select an excel file as the one to write to. There are ways to write excel files (Report generation toolkit etc.), but not with the VI's you're using.

 

Your best bet is to use the Write to Spreadsheet VI and then open that file using Excel.

 

-CC 

 

[Edit: Grrr! - getting that cup of tea let Dennis beat me to answer! Smiley Very Happy

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 9 of 17
(3,644 Views)

But with the spreadsheet file, I can't add any more information like date and time, the name of the channel,...etc. There is no input to add these things on the spreadsheet function.

0 Kudos
Message 10 of 17
(3,637 Views)