LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read an Excel file into a 2D Array and a Table with unknown number of columns and rows

Solved!
Go to solution

No rows are missing and the drawing dates match.

 

At the end of your code, just before closing the Application reference insert the Application.Quit method. This should solve the other issue.

 

Ben64

0 Kudos
Message 11 of 16
(1,094 Views)

Here is what I'm talking about:

 

The screen capture of the spreadsheet shows the yellow cells that are not getting read, and even though there are 2620 rows in that spreadsheet, only the last 819 minus the last few are getting read.   See attached spreadsheet screen capture.

 

Yet the VI that reads that spreadsheet only  keeps 819 of the rows, minus the last few for no explanation why.  See 2nd attached screen capture.

 

See attached VI that reads that spreadsheet, and see if you only get 819 rows by checking the "Row" index of the 2D array.

 

 

 

0 Kudos
Message 12 of 16
(1,088 Views)

The vi you are posting is not the same as the one in 2017-12-19 Spreadsheet Read VI.jpg. It seems that this vi do not use the LOTTO Type selector but the Sheet Name control to select the worksheet. Sheet Name is set to Powerball and if you look at the resulting array the Game Name is Powerball. In 2017-12-19 Excel Spreadsheet Data.jpg the Game Name is Texas Lotto which is clearly not the same worksheet. The Powerball worksheet has 819 rows and the last one date is 12-2-2017. When you open your workbook the Powerball worksheet is hidden, click the small green arrow at the lower left to display it.

 

pic-1.pngpic-2.png

front panel.png

Ben64

0 Kudos
Message 13 of 16
(1,080 Views)

@ben64 wrote:

No rows are missing and the drawing dates match.

 

At the end of your code, just before closing the Application reference insert the Application.Quit method. This should solve the other issue.

 

Ben64


So Where is the "Application Quit Method" ?

2017-12-20  Where is the Application Quit Method.jpg

 

0 Kudos
Message 14 of 16
(1,069 Views)
Solution
Accepted by topic author emw129

Drop an Invoke Node (ActiveX) from the Connectivity -> ActiveX palette. Wire it to the _Application refnum, press on Method to get the list of available methods and select Quit.

 

1-1.png1-2.png1-3.png1-4.png

 

 

Ben64

0 Kudos
Message 15 of 16
(1,064 Views)

Sample Here

LabView 2012...

 

0 Kudos
Message 16 of 16
(205 Views)