LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Searching from excel file

Solved!
Go to solution

@altenbach wrote:

Use index array with one of the indices disconnected. Resize for two outputs.

 

(depending on which index is disconnected, you either get a row or a column, so just try it)

 

FirstTwo.png


Could you please help me in this, i want to store data from xls file into array. but data should be display in column wise if string matched. Currently it store data in row wise. 

Download All
0 Kudos
Message 11 of 96
(818 Views)

Hi sam,

 

please stop posting the same questions in several threads. (Posting the same attachments isn't needed as well…)

 

One more suggetion:

Use different filenames for your attachments when they don't show the same content/image!

We usually only download to one "download" folder and downloading the same filename again and again makes the browser change the filenames to something like "filename (0)". Because of that we might look at the wrong image when the filename changed unexpectedly…

 

Btw.:

Attaching images of code instead of the code itself doesn't make a lot of sense…

(And use AutoCleanup before you upload your VI!)

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 12 of 96
(813 Views)

You can use "Transpose 2D Array" function to convert row data to column data.

 

And just like GerdW told before, please stop making several posts for the same question.

Especially for the topic you uploaded, You can find more than 10 similar posts with a minimum effort by simply searching.

0 Kudos
Message 13 of 96
(795 Views)

@jaylee2113  작성:

You can use "Transpose 2D Array" function to convert row data to column data.

 

And just like GerdW told before, please stop making several posts for the same question.

Especially for the topic you uploaded, You can find more than 10 similar posts with a minimum effort by simply searching.


Hi thanks for your response, but i dont want to covert row data into column. Actually i want to get selected column. I dont know how we select and which function we use to select selective column. Currently it work on selective row which i entered for searching xls file. Thanks 

And i understood and i already apologize for my mistake. Thanks  

0 Kudos
Message 14 of 96
(792 Views)

Hi sam,

 

but data should be display in column wise if string matched. Currently it store data in row wise. 

Then you should transpose your "dataArray" before displaying it in the indicator…

 

i dont want to covert row data into column.

But you asked the opposite before!

 

Actually i want to get selected column.

Where do you want to get "selected column"? Selected by what?

 

Please provide more information:

  • your VI instead of just images of your VI
  • example input data
  • expected output result
Best regards,
GerdW


using LV2020 on Win8.1+cRIO
0 Kudos
Message 15 of 96
(784 Views)

@GerdW wrote:

Hi sam,

 

but data should be display in column wise if string matched. Currently it store data in row wise. 

Then you should transpose your "dataArray" before displaying it in the indicator…

 

i dont want to covert row data into column.

But you asked the opposite before!

 

Actually i want to get selected column.

Where do you want to get "selected column"? Selected by what?

 

Please provide more information:

  • your VI instead of just images of your VI
  • example input data
  • expected output result

Hi thanks for replying, here is my VI file.

i want to select data from xls file for example in xls file data is display like this,

A     B      C      D     E        F

1     3       4      5      7        8

3     4.6    5      6.6    7       4.5

.........................................

 

So i want first search D column instead of D row, currently it search row where D is present. If you have any question please ask me. Thanks

0 Kudos
Message 16 of 96
(802 Views)

Hi sam,

 

why does it take so long before you are able to provide that basic information?

 

Anyway:

So i want first search D column instead of D row, currently it search row where D is present.

Simple:

  • Index the first row
  • search that row for your string
  • use the found index to index the column from your data

 

Like this:

check.png

This shows the basic principle, but does not include any error checking (like for "not found" conditions)…

 

Btw. didn't I suggest to use AutoCleanup before uploading your VI?

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 17 of 96
(798 Views)

@GerdW wrote:

Hi sam,

 

why does it take so long before you are able to provide that basic information?

 

Anyway:

So i want first search D column instead of D row, currently it search row where D is present.

Simple:

  • Index the first row
  • search that row for your string
  • use the found index to index the column from your data

 

Like this:

check.png

This shows the basic principle, but does not include any error checking (like for "not found" conditions)…

 

Btw. didn't I suggest to use AutoCleanup before uploading your VI?


you didn't upload VI Gerd..

0 Kudos
Message 18 of 96
(789 Views)
Solution
Accepted by sam67

Hi sam,

 

you didn't upload VI Gerd..

No, intentionally.

 

Come on: you see my example!

It's just 3 functions, two of them IndexArray and one Search1DArray. And you got an explanation, so you should be able to replicate the example on your own!

 

(By wiring yourself you learn much better than by just taking code from someone else. :D)

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 19 of 96
(783 Views)

@GerdW wrote:

Hi sam,

 

you didn't upload VI Gerd..

No, intentionally.

 

Come on: you see my example!

It's just 3 functions, two of them IndexArray and one Search1DArray. And you got an explanation, so you should be able to replicate the example on your own!

 

(By wiring yourself you learn much better than by just taking code from someone else. :D)


hahhahaha yes got it man btw thanks allot. see you in next problem 🙂

0 Kudos
Message 20 of 96
(778 Views)