LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel function bugs?

Hello,
I am currently doing quite a bit of excel access and noticed a couple of things...
 
First, the help and panel help (ctrl-p thing) for ExcelRpt_FreeStringData don't seem to corrispond to the actual code.  The help says that it only takes the pointer data, but looks like the code needs the count of the pointers as well.  No biggie, but just wanted to point it out.
 
Second, and maybe more serious, the help for ExcelRpt_GetNumCellsInRange states that
"This value should be a string containing the cell range, such as "A1" or "A1:D5" "
0 Kudos
Message 1 of 5
(3,840 Views)
sorry... computer i.e. did something funny....
 
continuing the second question..... the help file says it can take a single cell or an array, but the function dies with a single cell.
 
While the functions result is obvious for a single cell, I call it in a loop with multiple ranges.  Just wondering if it really isn't suposed to take a single cell and I need to just work around it?
0 Kudos
Message 2 of 5
(3,838 Views)

Good afternoon,

 

I belive that the function *should be able to handle a single cell.  In fact in the documentation for that individual parameter it states:

 

“A rectangular range of cells.

This value should be a string containing the cell range, such as "A1" or "A1:D5".”

 

The example of “A1” is just a single cell.  That being said, the problem is likely related to which version of Excel you are using.  This driver was designed for use with Excel2000 which may be much older than what you are using.  Since it uses ActiveX to implement all the features and Microsoft changes the activex libraries with each version sometimes weird behavior or outright failures can happen.  Which version of Excel are you using?  Also, you can open the source for the function and modify it as you wish – then you could just do a check in that function for a single cell and return “1” or something like that.

 

Hope it helps-

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 5
(3,823 Views)
That's probably it then as I have office 2003 installed.  This seems to be a problem with any of the range calls
 
I'll probably just modify my code to take this into account..... I don't like the idea of modifying the source code that came with CVI as every engineer working on the project would have to do this as well and any new installs would have to remember this as well. 
 
Are there any plans in the works to update the interface?  I beleive excel 2k is what, 2 versions old now?
 
thanks.
0 Kudos
Message 4 of 5
(3,796 Views)

My understanding is that there are plans to update them, though past that I couldn’t get any additional information.  It sounds like your plan to modify your source rather than the CVI C code is sound.  Thanks for posting, and good luck!

Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 5 of 5
(3,774 Views)