01-23-2009 12:15 PM
For some reason, the write to spreadsheet function is giving me problems.
If I input a 1D or 2D array of ints or dbls or sgls, I can format the spreadsheet as %3f or whatever I need it to be.
I wanted to have headings above the columns, so I made an array of strings.
I changed the 2D array of DBL to decimal strings, and used build array to add the strings in the first row.
What do I need to wire to 'format' in the write to spreadsheet function to not get an error.
I tried %s and it doesnt work.
Solved! Go to Solution.
01-23-2009 12:20 PM
Cory K wrote:"is giving me problems"
"to not get an error.""it doesnt work."
What kind of problems? What error? What doesn't work? Did you change the polymorphic version of the Write To Spreadsheet File to be the string version since you're using strings?
01-23-2009 12:29 PM
smercurio_fc wrote:What kind of problems? What error? What doesn't work? Did you change the polymorphic version of the Write To Spreadsheet File to be the string version since you're using strings?
Once I have my array (of strings) I try to wire it to the '2D array' input. LabVIEW then shows the wire as broken, as it should.
The error is a data type error, telling me that I input a 2D array of strings, and it wants a 2D array of Singles.
I'm just not sure what to wire to the 'format' input to make the function accept an array of strings.
Is that what you referred to as "changing the polymorphic version .... to the string version" ?
If so, could you please tell me how this is done?
Thanks for your help smercurio
01-23-2009 12:49 PM
01-23-2009 01:13 PM - edited 01-23-2009 01:14 PM
smercurio_fc a écrit:
Yes, that's what I'm referring to. The Write to Spreadheet File is a polymorphic VI, and the DBL version is the default one you get. To select another variant right-click on the VI icon and select Visible Items->Polymorphic VI Selector. This will display the polymorphic selection menu right below the VI. Click on this and select the "string" variant.
... or go a few lines below and select directly the variant 😉
01-23-2009 01:19 PM
02-04-2009 01:00 PM
Is this possible in 7.1?
I right clicked, went to visible items, and didnt see 'polymorphic vi selector'.
Is there a different method in this version?
02-04-2009 01:05 PM
02-04-2009 02:40 PM - edited 02-04-2009 02:45 PM
Thanks smercurio, that worked perfectly.
Too bad I cant choose 2 different solutions :
A 7.1 solution and an 8.x solution.