LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How many column could I read from Excel ?

I have an excel template and I want to read data from this file.

Its not a small file, I could read 10 column from this data but after 10 column programs got an error "about property node" no matter how large the file is. 

Here is  my program and my template file.


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 1 of 9
(2,819 Views)

An error where? What is the exact error code, and where does it occur? I ran your subVI that reads the Excel file and did not encounter an error, even when telling it to read 12 columns (the additional columns were converted to be empty string).

 

As for the code: You are not properly doing the ActiveX programming. You should be calling the Quit method at the end of the code, not at the beginning. It makes no sense to try to quit Excel before you've actually done anything. You should not need to resort to using taskkill to quit Excel. Please review the example that ships with LabVIEW that shows you the proper way to do it.

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

An error on Ranger value2 property node.

error.jpgerror2.jpg

 

Error code is : -2147024882

Source : Property Node (arg 1) in ExcelParametreOku.vi

 

I'm using the task killer because Excel.exe doesnt close after my code stopped.

excel.jpg

 

I've tried to quit excel but it didn't work.

 

I'm using task killer


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 3 of 9
(2,804 Views)

The fact that Excel is still running means that your code is wrong, most likely references that are not closed.

Take the previous suggestion and read up on how to properly work with Excel.

 

 

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

Did you look at my code ?


Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 5 of 9
(2,788 Views)

I can't speak for nyc, but I certainly did look at your code. That's why I said you were doing the ActiveX programming incorrectly. I have never had to resort to using taskkill to quit out of Excel when manipulating Excel from LabVIEW.

 

The specific error code that you are seeing is a "Not enough storage is available to complete this operation" error. This implies a memory leak. Looking futher at your code you shouldn't even have the opening/closing of Excel inside the subVI. Since this is being called in a loop you are effectively opening/closing Excel each time the loop in "Start" VI iterates. Opening/closing of Excel should be done once

 

Also:

  • Using Equal/Not Equal for comparing a Boolean to True/False (as done in the "Start" VI) is simply silly. Use a Boolean Invert function. 
  • There already is a comparison function to test for an empty path. Thus you do not need to use the Equal function and an empty path constant.
0 Kudos
Message 6 of 9
(2,785 Views)

 

 

 

 


Yasemin Barutçu
Electrical And Electronics Engineer
Download All
0 Kudos
Message 7 of 9
(2,768 Views)

NO.

 

You're not listening. I told you not to call the Application Quit until the end. Did you do that? No. Your code still leaves Excel running in the background.

 

An event structure is not designed to reside on a block diagram on its own like that. There are a couple of very specific cases when you'd want an event structure all by itself. This isn't one of them. Let me guess. You're running the VI by using the Run Continuously button, right? That's also wrong, if you're doing that. 

 

I cannot get the error you are getting. The only thing I can think of is that it has to do with the specific version of Office that you are using.

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

What do you mean about the "specific version of Office". I'm using MS Office 2007 but my customers could use any... Does it really matters? If it matter, how could I design this code to make it usefull for every version of Office.

 

I've changed the code but I uploaded the wrong VI I'm sorry. 

Now I removed the event structure either. Still getting this error. 😕

 



Yasemin Barutçu
Electrical And Electronics Engineer
0 Kudos
Message 9 of 9
(2,746 Views)