LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error coming when run due to the add path function with write to spreadsheet fun

Solved!
Go to solution

Hi everybody,

I was wondering why the error no. 7 is coming as attached, when I run the program.

 

My intention is to write the data (from the FIFO) to the spreadsheet using Write to measurement function. I have connected the 1-D array to the 1-D array input of this function. I have connecetd the add file port of this sub VI to the add file controller. I could not connect it withe add file indicator. Wire shows broken when doing that.

 

Can you give me necessary suggestion to overcome this error and accomplish my recording of data using that sub VI (Write to spreadsheet.vi)?

 

Necessary attachments are given for your convenience.

 

Thank You.

 

 

0 Kudos
Message 1 of 14
(3,267 Views)

You forgot the attachments.

0 Kudos
Message 2 of 14
(3,257 Views)

Attachments are here. Sorry for the mistake.

0 Kudos
Message 3 of 14
(3,246 Views)

Based on the pictures you attached, it seems like when you run your VI, you have a file dialog box popping up to ask you where to save the file.  And when you do that, you are selecting a file location that happens to be on UTA's desktop.

 

Is it possible you don't have the security rights to create this file on UTA's desktop?  Do any other programs (such as Excel) have this file open?

 

Create a file path control on your front panel so that you can preselect the file name.

 

What operating system and version of LabVIEW do you have?

Message 4 of 14
(3,233 Views)

I have Windows 7 as OS and version 2010 for LV

 

Yeah, that excel is not a read-only file, meaning I should have been able to write on this file, am I right?

 

 

0 Kudos
Message 5 of 14
(3,227 Views)

Windows 7 has tighter security restrictions than previous versions of Windows, so that doesn't rule out the possibility of trying to create a file that you aren't permitted to do so.

 


@auree123 wrote:

  

Yeah, that excel is not a read-only file, meaning I should have been able to write on this file, am I right?

 


???

I don't know what you are asking and how that relates to the question I am asking you.

 

Have you created a file by that name that Excel currently has open?  Then when you try to run your VI, you are getting the error?

If Excel has a file open, then it puts a lock on the file that no other program will be allowed to open the file.  You would get an error in LabVIEW.  I don't know whether it would be the same error 7 that you are getting or another code.  But I am asking questions to try to rule out some of the things that I know would cause you problems.

 

By the way, you do know that what you are creating is a text file and not an Excel file?  Just giving it an .xls extension does not automatically make it an Excel file.  Although if you open it in Excel, Excel is generally smart enough to recognize text files and know how to import them.  You really should use an extension like .txt or .csv and not .xls so that you don't confuse your file with real Excel files.

 

0 Kudos
Message 6 of 14
(3,221 Views)

Hi,

 

Now I am getting only error no. 43 after adding the file path to the new path output of the write to spreadsheet.vi.

 

Can you suggest to recover this error please.

 

Note. My intention is to write the data to a text/xl file after I hit the run button.

 

Anyone's  feedback would be appreciated.

 

 

0 Kudos
Message 7 of 14
(3,211 Views)

Did you read the error message?

 

Error 43 (which really shouldn't be an error, more of a warning) says the user cancelled the dialog box.  When you do that, there is no valid path and thus the file saving functions can't work.

0 Kudos
Message 8 of 14
(3,208 Views)

Yeah, I understand that message.

 

But don't know why that msg comes?

 

I just hit the run and no dialog comes, just that msg comes.

 

Anyway< I think any silly thing goes on which I have to find out.

 

Thank You.

 

 

0 Kudos
Message 9 of 14
(3,202 Views)

Do you have your file selected in the file path before running the VI, not have a file selected first would throw that error.

Applications Engineer
National Instruments
0 Kudos
Message 10 of 14
(3,187 Views)