LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Darren's Weekly Nugget 09/25/2006

I've seen posts on the discussion forums over the years with people lamenting the fact that the Read from Spreadsheet File.vi and Write to Spreadsheet File.vi only take DBL arrays as inputs.  People have often talked about how to modify these VIs if you need to read/write string data (or sometimes integer data, since the formatting is different).  Well, as was mentioned in this thread, Read from Spreadsheet File.vi and Write to Spreadsheet File.vi are both polymorphic in LabVIEW 8.2, and can accept DBL, I64, or String arrays as inputs.  Naturally, any integer input will use the I64 instance, and any real floating point input will use the DBL instance.  Hopefully this will save people some time, particular with string data (that's the use case I most often wanted in previous LabVIEW versions).
 
-D

P.S. - Check out past nuggets here.
Message 1 of 6
(8,689 Views)


@Darren wrote:
...  fact that the Read from Spreadsheet File.vi and Write to Spreadsheet File.vi only take DBL arrays as inputs...
It was actually worse than that. They only "accepted" SGL, so DBL would have been coerced. 😮
0 Kudos
Message 2 of 6
(8,652 Views)

Ah yes, as I was typing my nugget, that's what I was initially thinking, but I checked real quick in LabVIEW 8.0 and saw that it was a DBL value.  So it looks like we changed from SGL to DBL in 8.0, but didn't add the cool polymorphic ability until 8.2.

-D

0 Kudos
Message 3 of 6
(8,646 Views)
Thanks Darren,

Nice to know .....that vi has allway being a pain.Now in LV 8.2 no more stress.

Keep the Nuggets comingSmiley Very Happy

Ohiofudu
CLAD
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 6
(8,634 Views)
I was unhappy with the (old) read and write sgl, back in LV 5.1 and modified a version of each to read and write dbl.
I'd been carrying around Read dbl From Spreadsheet File.vi and Write dbl to Spreadsheet File.vi in my User.lib directory until 8.2.
 
 
0 Kudos
Message 5 of 6
(6,019 Views)
I just recently had to use the Write to Spreadsheet function in a project, and I was really impressed with how fast and easy it was. 

Not only that, but I was able to pump out 60 columns of data 50 times a second without any optimization at all. 

Maybe that's not so impressive with new hardware and all.  But the last time I had to log data this way was several years ago using the now defunct Visual Designer.  If I had these tools back then, I'd probably have more hair now.  Smiley Very Happy
---------------------
Patrick Allen: FunctionalityUnlimited.ca
0 Kudos
Message 6 of 6
(6,009 Views)