LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to file using "Write To Spreadsheet File VI" -> Error 7

I have tried to write an 2D matrix to file using the function "Write To Spreadsheet File VI" and gives me an error.

I have attached the simple code and the error (the function to write is inserted in a time looped file which is not visible in the print screen).

I don´t know if anyone is familiar to this error...!

 

Regards

José Pedro

0 Kudos
Message 1 of 9
(2,364 Views)

This is a very common error.  Have you verified the path is correct to your data file?  Leave the fp window open to your VI when you run the main code and verify your path.  At some point, LV cannot find the file your are intending to use, as the error implies.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 9
(2,354 Views)

My first thoughts would be to check the path is correct, I have recreated the error you are seeing from the screen shot by putting an incorrect string here, if this is not the problem would it be possible for you to post the time looped part as well.

 

Hope youo find the problem

 

TDarkins 

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 3 of 9
(2,353 Views)

I think the likely issue is that the path shown may be for a directory, rather than a file. You cannot write data to a directory.

0 Kudos
Message 4 of 9
(2,348 Views)

if the all but the final name exist as a directory then LV creates a file called whatever the final name is but with no file extension, if the directory doesnt structure previous is wrong then error 7 occurs. using the problem : if the director c:\documents and settings\jpsousa\ambiente de trabalho\cenas exists then a file called ficheiro(with no extension)  will be created. if the directory doesnt exist then error 7 will occur.

 

hope it helps,  

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 5 of 9
(2,345 Views)

@Tdarkins wrote:

if the all but the final name exist as a directory then LV creates a file called whatever the final name is but with no file extension, if the directory doesnt structure previous is wrong then error 7 occurs. using the problem : if the director c:\documents and settings\jpsousa\ambiente de trabalho\cenas exists then a file called ficheiro(with no extension)  will be created. if the directory doesnt exist then error 7 will occur.

 

hope it helps,  


No, he is opening the file (if memory serves).  If the input enum is set to replace or create, then it will create a new file, but not with "open."

 

Edit: Correction, you are correct.  I forgot which VI he was using.  Forget what I said (My memory wasn't serving me).Smiley Sad

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 6 of 9
(2,335 Views)

 

Thank you very much for your replies.

However, I have tried sereval times to write to an spreadsheet the matrix and nothing worked... It gave all the time these errors: 7 and 43.

 

I started to thought the problem was my pc. So, I made a simple VI, please look to the attached file, in which I save an empty matrix. The configurations are in the left and the error in the right.

 

I would ask if you can do this simple VI in your pc to figure what the problem is.

 

Thank you in advance.

Regards

José Pedro

0 Kudos
Message 7 of 9
(2,305 Views)

If you wire an empty path into the Write to Spreadsheet File VI, then it will ask you where to save the file. You must have clicked Cancel on the dialog, and so you get error 43. That's by design.

 

As for error 7, as noted already, you need to verify the path is correct.

 

Also, you do not need to convert the array to matrices. You do not need to deal with matrices unless you are doing linear algebra. Are you? Just wire the array into the "1D array" input.

0 Kudos
Message 8 of 9
(2,275 Views)

I think I know what the problem is, but I have got no solution for it

 

When I make a regular VI in my pc, I can the matrix to a spreadsheet with no problem. When I make the same program in real-time, occurs every time the error 43, even with the simplest program.

 

Can't we save data matrix in real-time VI's??

0 Kudos
Message 9 of 9
(2,243 Views)