09-25-2020 05:27 AM - edited 09-25-2020 05:30 AM
Something that often irritates me is if I am trying to convert a 1D array to spreadsheet string but without the EOL character.
I always end up having to manually remove the EOL character afterwards which is a waste of BD space.
Surely there is an easier way of doing this that I have never thought of?
Edit. Also, I know about the 1D string array to delimited string function, but this requires me to convert my numeric to an array of strings first. The number to string primitives do accept arrays by I cannot work out a way of converting them to an auto formatted string with no trailing zeros as the code above does.
09-25-2020 05:36 AM
There is a "trim whitespace" function that you can use after the "array to spreadsheet string".
09-25-2020 05:46 AM
Step in the right direction, thanks. I haven't used that before and assumed it only removed spaces not other things as well.
09-25-2020 06:14 AM
You're not alone: See the idea Row-Separator-Input-for-Array-to-Spreadsheet-String-Function.
That idea will fix your problem too...
09-25-2020 06:21 AM - edited 09-25-2020 06:23 AM
@Niatross wrote:
Edit. Also, I know about the 1D string array to delimited string function, but this requires me to convert my numeric to an array of strings first.
And have you looked inside of that VI?
I also just use the Trim Whitespace.
09-25-2020 06:25 AM
I hadn't looked inside it, I should have. More robust than what I do as one of my qualms was that the EOL size would be different on different OS's.
I was just hoping that I had missed something simple with the array to spreadsheet string function...clearly not
09-25-2020 06:25 AM
@Niatross wrote:Edit. Also, I know about the 1D string array to delimited string function, but this requires me to convert my numeric to an array of strings first. The number to string primitives do accept arrays by I cannot work out a way of converting them to an auto formatted string with no trailing zeros as the code above does.
Save a copy of that VI as .vim, then it will accept everything (literally) as input. It will break if you wire incorrect inputs... Not as good as a function, but as good as it gets at the moment.
09-25-2020 08:08 AM
Old school solution. 🙂
09-25-2020 09:28 AM
@Yamaeda wrote:
Old school solution. 🙂
Last time I checked, even the fastest DIY substitute was at least 100X slower.
LabVIEW got significantly better over the past few years, so maybe it's not that dramatic anymore.
Mine would look like this: