LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Working with Excel spreadsheet embedded in access table

Hello!

I have Access DB which contain Excel spreadsheet objects embedded in table. To work with DB I use ADO-Tool based on ActiveX. Data passed to my program from GetRows method as 2D array of variants. As I understand I should convert variant to object refnum and then use this refnum with property and invoke nodes to get data from spreadsheet. How to select data type for VariantToData to work with Excel spreadseet?

0 Kudos
Message 1 of 10
(3,481 Views)

Hi Err,

 

I will better be able to help you if you post some of your code. Can you post the portion of the code where you are doing the reading?

 

thanks

Flash

National Instruments
Applications Engineer
0 Kudos
Message 2 of 10
(3,455 Views)

Hi, thank you for reply!

I attached VI and Access DB file. In DB I've changed spreadsheet object to wordpad object, but the problem is the same.

0 Kudos
Message 3 of 10
(3,437 Views)

Hi Err,

 

You should convert each data type individually. Look at the following post:

http://forums.ni.com/ni/board/message?board.id=170&message.id=213244&requireLogin=False

 

FLash

National Instruments
Applications Engineer
0 Kudos
Message 4 of 10
(3,407 Views)

Hi,

 

Isn't it the same that using Index Array function? I believe that problem is in conversion of variant to refnum. For example, if I change refnum data type to string in Variant To Data, no error appears, and I've got some text data (see the attachment).

0 Kudos
Message 5 of 10
(3,391 Views)

Hi Err,

 

Does the code give you valid values?

 

FLash

National Instruments
Applications Engineer
0 Kudos
Message 6 of 10
(3,372 Views)

Hello,

 

The last example with string in data type, returns valid string. The previous one returns an error.

0 Kudos
Message 7 of 10
(3,361 Views)

Hi Err,

What toolkit are you using for the ADOTool VIs?

 

FLash

National Instruments
Applications Engineer
0 Kudos
Message 8 of 10
(3,353 Views)

Hi A_Patel,

 

I'm using this one http://forum.ib-berger.com/index.php?showtopic=27

0 Kudos
Message 9 of 10
(3,342 Views)

Hi Err,

 

What data type is Spector? You should use that specific data type to convert the variant.

 

FLash

National Instruments
Applications Engineer
0 Kudos
Message 10 of 10
(3,337 Views)