LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can somebody please suggest me how do I free unwanted space alloted to an array in LabVIEW6i?

I m suppose to get this data from excel and the number of records in excel worksheet vary. I thought of copying the entire column into an array but the VI profiler shows usage of memory that is way beyond acceptable.I was thinking if I could free the space allocated after usage immediately? Please help.Or is there a way I can only get the column data till a point it has data and not the entire column.
0 Kudos
Message 1 of 4
(2,712 Views)
Hi,
you can get the # of clumns/rows filled in a worksheet by the property UsedRange; see this previous post:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=137&HOID=50650000000500000060D70000&HTHREAD=000055136&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Good luck,
Alberto
Message 2 of 4
(2,712 Views)
Thank you so much alberto. Last night I was going through finding 'last used cell' techniques somebody suggested that Used Range is not very accurate(http://www.beyondtechnology.com/geeks012.shtml) and he/she has suggested an alternative approach.I thought would just share the info with you.
Thanks once again.
0 Kudos
Message 3 of 4
(2,712 Views)
Thanks a lot for sharing!
I did not know about this possible problem, I'm not an expert in VBA though.
I admit that for interfacing with Excel/Word I normally use th Report Generation Toolkit for Office; this saves me from digging into ActiveX!
Alberto
0 Kudos
Message 4 of 4
(2,712 Views)