LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read all lines of a spreadsheet except the first one

Solved!
Go to solution
I have a spreadsheet with titles and I want to read another spreadsheet with titles and append that info to a single spreadsheet, but I want to remove all titles from the second apreadsheet,third, fourth....
Can someone please tell me how to do this?
I was thinking that maybe if I converted the spread sheet to string, search and rrplace titles and then back again to a 2d array spreadsheet, it could work. The thing is I don't know how to return to a 2d array spreadsheet from the string with a single vi or in the easiest way possible, without knowing the amount of lines in every apreadsheet.
0 Kudos
Message 1 of 9
(4,777 Views)
Solution
Accepted by topic author Nando88
Hi,

Read the first line of the second file and throw the data away. THEN read the remaining rows...
Or read all rows and delete the first row from the array...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(4,771 Views)

@Nando88 wrote:
I have a spreadsheet with titles and I want to read another spreadsheet with titles and append that info to a single spreadsheet, but I want to remove all titles from the second apreadsheet,third, fourth....
Can someone please tell me how to do this?
I was thinking that maybe if I converted the spread sheet to string, search and rrplace titles and then back again to a 2d array spreadsheet, it could work. The thing is I don't know how to return to a 2d array spreadsheet from the string with a single vi or in the easiest way possible, without knowing the amount of lines in every apreadsheet.

Hope SpreadSheet will give you all the Rows and Coulmns based on Delimiter values, Mostly your title will be in First column, so use array subset and extract data without the title whwnever you dont need the title.

it will satisfy the requirement i guess!

If you need more in detail please attach the Vi

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 3 of 9
(4,767 Views)
How do I delete the first row of the areay?
0 Kudos
Message 4 of 9
(4,740 Views)

Delete from Array

 

Or use Array Subset like Palanivel stated.

0 Kudos
Message 5 of 9
(4,724 Views)

@Nando88 wrote:
How do I delete the first row of the areay?


Have you ever used the LabVIEW Array Functions?  Do you see the one called "Delete from Array"?  Do you know how to right-click a function and ask for LabVIEW Help?  Can't you figure it out?

Array Functions.pngDelete From Array Help.png

 

Bob Schor

0 Kudos
Message 6 of 9
(4,698 Views)
Sorry if I'm rude but if I knew, I wouldn't be asking.
0 Kudos
Message 7 of 9
(4,682 Views)

@Nando88 wrote:
Sorry if I'm rude but if I knew, I wouldn't be asking.

No, you are not rude, but how are you learning LabVIEW?  How can you be asking about more complex stuff when you don't even know the basic rudiments of using LabVIEW's basic functions (you should at least recognize you are dealing with Arrays, so you should know to look at the Array Palette and look at the names of the functions there, and if what you want do to is "delete" something, you should look at a function that has the word "delete" in its name), and once you have the function on its Block Diagram, know how to get "help" on its inputs, outputs, and functioning.

 

Even though I've been doing LabVIEW Development for a few years, I still frequently look up Help on functions such as this, as there are sometimes "rarely-used inputs" that do things you didn't know about, or subtleties in how it handles errors, or certain inputs that have "unexpected" meaning.  Delete from Array is one such example -- the default input for the Index to delete is 0, but its behavior if unwired is to delete the last (rather than the 0th, the first) element from the Array.

 

So I blame your Teacher for doing a lousy job of teaching you basic LabVIEW fundamentals.  I realize that you might be "self-taught", in which case I'll blame the Tutorial Material you read, which should have covered this (and if you didn't read any Tutorial Material, then I'll blame you ...).

 

Bob Schor

0 Kudos
Message 8 of 9
(4,631 Views)
The funny thing is I received core 1 & 2, and I am already a clad certified developer, and I wasn't taught all the basics. So its not my fault.
0 Kudos
Message 9 of 9
(4,613 Views)