LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
P@Anand

Array to Spreadsheet String - Corrections required

Status: New

I am extensively using the Array to Spreadsheet string Primitive and most of the time I never used the Format string input (Use to wire an empty string constant) and still I am getting the right result what I expect. So I think it would be better if the Required Terminal is changed to an Optional Terminal.

 

It is known that the Array to Spreadsheet string is Polymorphic, but when we wire an array of I32 and DBL the output string is DBL format only. It would be good if the output String adapts the data type that is wired unless otherwise specified by the Format string.

 

Changes needed for Array to Spreadsheet String.png

-----

The best solution is the one you find it by yourself
4 Comments
altenbach
Knight of NI

It was probably more than 10 years ago that I raised exactly this point elsewhere. I was always confused by the fact that a terminal is "required", but actually does not really care what is wired to it if we wire garbage and there is not even an error out so it can complain about it.

 

I am a big proponent of "defaults" and almost never wire optional inputs if I like the default behavior. Others code more like german bureaucrats, where everything needs to be spelled out and defined explicitely. Note that there are efforts to make even more connectors required. 😄

 

Often, I am more interested to get a working code skeleton than to worry about output cosmetics. Once the algorithm is right, I can immediately see from the output if it needs a better format and it would be difficult to miss what to do if really needed. A incorrect default format cannot hide, so there is no danger of missing it in the final code review. It should not break the code if unwired.

 

I am all for making this connector optional, so kudos!

Ray.R
Knight of NI

agreed!  Kudos.

 

The beauty of posting after Altenbach is that there's no need for any further explanation.

parthabe
Trusted Enthusiast

Additionally, I'd like the setting/option to enable/disable "Format String type same as that of the Input Array type" to be available in the Properties of this function. Smiley Happy

 

Share your opinion on this.

- Partha ( CLD until Oct 2024 🙂 )
AristosQueue (NI)
NI Employee (retired)

parthabe: I suspect that if we implemented this feature, your request would be a requirement in order to maintain backward compatibility for anyone who passed in an empty string and an int32 array. So I suspect this would happen. New instances would probably drop with the option enabled by default, but old instances would mutate forward with it disabled.