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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I append numeric as well as string data from an Excel file to a Table..?

The Excel file contain some string data and "date". Date is in "11-Apr-11" format, Upon executing the VI; it is appending the "date" as "40613" instead of "11-Apr-11" to the table on the front panel....

0 Kudos
Message 1 of 4
(2,284 Views)

Hi,

 

This value represents the number of days from 00.01.1900. But this is the Excel format.

In Labview format the date are the days from 01.01.1904.

 

Thus, this number has to be corrected in order to fit the LabView format and to be multiply with the seconds in one day 3600 x 24 hours.

 

Please make some test to be sure that it works and adjust the offset 1462 if necessary.

 

Paul

0 Kudos
Message 2 of 4
(2,279 Views)

Hi,

 

This is the issue i am facing.

 

Attached is the sample excel sheet which has string, numbers, and date format in a sheet.

 

When reading this excel sheet as text, i am expecting the output 1D array (say a) of string indicator to have the following values (in order of array indices) - a[0] = Hello, a[1] = 109, a[2] = 4/2/2011.

 

But actual read value is a[0] = Hello, a[1] = 109, a[2] = 40635.

 

Assume Excel sheet is very huge and has many date entries in it.

 

Is there any generic VI which will read all the entries as text and display the date in expected format.

 

Your help is greatly appreciated

Regards,
Muthuraman
0 Kudos
Message 3 of 4
(2,257 Views)

Hi,

 

This is exactly what I've sent to you in the previous post. You just have to add a String to Float conversion vi and it's ready. Take another look in the attachment from this post.

 

I think it's exactly what you need. Convert from a string "number" 40635 to date. The VI does this.

 

Paul

0 Kudos
Message 4 of 4
(2,249 Views)