NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
avinash3010
Posts: 12
0 Kudos
Accepted Solution

Read integer values from spreadsheet and display the values in a table

Hi all,

 

I have integer values to read from a spreadsheet and display them in a table. I am using 'Read from spreadsheet file' in 'integer' mode. I would like to display these values in a table. The problem is that the table takes only 2d-array of string as input but not integer.  

 

It works fine if I change the mode of 'Read from spreadsheet file' from 'integer' to 'string' but I want to read integers and have to use the integer values for further calculations. Please give any suggestions on displaying integers to a table.

 

Thank you. 

Active Participant
P@Anand
Posts: 1,616
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

You do the same thing but in the display part convert that into string and display them but for the other numeric operation you can take the values from the numeric that you are reading from the spreadsheet.

-----

I don't believe in Hard work. I love my work :smileyhappy:
Member
avinash3010
Posts: 12
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Hi Anand,

 

I tried converting each element into a string by using index array and build it back into an array of string but it failed to dsplay.

 

Thank you.

Trusted Enthusiast
TiTou
Posts: 2,689
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Can you post your VI that fails?

________________________________________________________________
"Cambiar el mundo, amigo Sancho, que no es locura ni utopía. sino justicia."
Cervantes
Active Participant
P@Anand
Posts: 1,616
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

No don't take element by element just convert as a whole. See the attached example

 

Array convert.png

 

Good luck

-----

I don't believe in Hard work. I love my work :smileyhappy:
Member
avinash3010
Posts: 12
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Thank you Anand...it is working..

 

but it is displaying the decimal places with zerors. any suggestion to remove this?

Active Participant
P@Anand
Posts: 1,616
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Then use Numeric to Decimal String function.

-----

I don't believe in Hard work. I love my work :smileyhappy:
Member
avinash3010
Posts: 12
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Thank you very much.

 

Member
avinash3010
Posts: 12
0 Kudos

Re: Read integer values from spreadsheet and display the values in a table

Hi TiTou

 

Sorry for not posting the VI. I got the solution before I could post. Thank you verymuch for replying.

Trusted Enthusiast
TiTou
Posts: 2,689

Re: Read integer values from spreadsheet and display the values in a table

No worries, glad to see you've got a solution :smileyhappy:

________________________________________________________________
"Cambiar el mundo, amigo Sancho, que no es locura ni utopía. sino justicia."
Cervantes
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page