LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem

Hi.
I want to save the content of a few multicolomn listboxes to a file (spreadsheet file for excel) The content is both integers and strings, but saved as strings to the file. See figure. How can I read the file back into listboxes? If I use read spreadsheetfile.vi, the content is converted to an array of double and I loose the string content... Smiley Sad
 
Thnx.
0 Kudos
Message 1 of 6
(3,059 Views)
For some reason, the Spreadsheet VIs don't support strings. However, if you look at the BD of those VIs you will find instructions for how to modify them to do that. Just remember to save it under a different name.

___________________
Try to take over the world!
0 Kudos
Message 2 of 6
(3,039 Views)
Hi Christian_nor:

I used to have the same problem when I wanted to read an actual string
from a spreadsheet file (and not have it turn into numbers and
nonsense). I ended up modifying the "read from spreadsheet file" VI to
read a string instead. I will email you a copy of this as I am unsure
how to upload the VI for you to download. Hope this helps!

-Ray

0 Kudos
Message 3 of 6
(3,023 Views)

Ray wrote:
> Hi Christian_nor:
>
> I used to have the same problem when I wanted to read an actual string
> from a spreadsheet file (and not have it turn into numbers and
> nonsense). I ended up modifying the "read from spreadsheet file" VI to
> read a string instead. I will email you a copy of this as I am unsure
> how to upload the VI for you to download. Hope this helps!
>
> -Ray

I see you have no working email. If you want you can email me at
Dnomyar220@gmail.com and I will reply with the VI. Thanks!

0 Kudos
Message 4 of 6
(3,024 Views)

Ok. I made the described changes in the BD and now it works 🙂

But I got another problem... In some of the cells I have multiple lines of input (one sentence and then a return and new line with another sentence.) This is not stored as 1 cell in the spreadsheet file and causes trouble... Can this be fixed?

0 Kudos
Message 5 of 6
(2,991 Views)
Christian_nor wrote:
> Ok. I made the described changes in the BD and now it works 🙂
> But I got another problem... In some of the cells I have multiple lines of input (one sentence and then a return and new line with another sentence.) This is not stored as 1 cell in the spreadsheet file and causes trouble... Can this be fixed?

Yes, but this may be a little more tricky. What I would try to do is
programatically (using the string functions in labview) rearrange these
cells into one line before saving them to the spreadsheet file. For
example:

Change:

username2 (returnline)
Franky234

Into:

username2 x Franky234

This will enable you to access both lines of information from a single
cell in your spreadsheet file, and if the information needs to be
seperated to different lines again, you can do this by searching for
the 'x' (x can be any indicator or value denoting a linebreak).

Hope this helps!

-Ray

0 Kudos
Message 6 of 6
(2,980 Views)