From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-08-2020 08:59 PM - edited 04-08-2020 09:59 PM
Hi, I am importing the data into LabVIEW. However, some data occupy 2 columns but when it is imported into LabVIEW it only shows in one column and the other column is empty. Is there a way for me to merge multiple columns in a 2D array? You can use the excel file as a sample.
My code:
The array I got is not the same as the excel file.
04-08-2020 09:10 PM
I don't understand your question or how it relates to LabVIEW.
It would have been helpful if showed your LabVIEW code you claim is doing the importing.
What I do see in your XLS file is that you have columns merged. But how you are importing and how you expect the results to be are missing in your question.
04-08-2020 09:30 PM
I expect my result to be the same as the excel file but I got different array when I imported.
04-08-2020 09:36 PM
Where is your VI?
You haven't shown us how you "imported" it.
I don't know of any "Import Excel" function in LabVIEW.
04-08-2020 09:41 PM
I used the New Report.vi from Labview to import data from Excel. I just attached my code in my post.
04-08-2020 10:54 PM
What do you expect? It sounds like you expect 3 15's in that 4th row? Why?
There is only on 15 in that row. It exists in Cell C4. Cells C5, C6 don't have any data in them. They can't have any data in them.
The data doesn't "occupy" two columns. It is only in one cell. It is a visual effect Excel does to stretch the appearance of that cell across multiple cells.
It is like you are expecting LabVIEW to treat spreadsheets differently than the way Excel treats them.
04-08-2020 11:16 PM
oh, I see then is it possible to place three 15 in 4th row of the array instead of one 15 while the others are empty?
04-08-2020 11:47 PM
Why are you messing around with merged cells?
If you want to put 3 15's in there, then you need to figure out how to know C4 is merged with C5 and C6, get the value of C4, and replace the values in C5 and C6 with that value.
What you are trying to do here is very strange. What are you actually trying to do with this Excel file?