Hello,
I am having troubles getting excel to work with ActiveX. I am using LabView ActiveX and of course, Excel. I have an Excel spreadsheet that performs a number of conversions for me Hex to Binary, Binary to Hex, Decimal to Hex, etc... When I write to a range from LabView to the worksheet in Excel, it writes just fine, but all of my conversion calculations turn into #NAME errors, which obviously causes issues when I read back the values from those cells using ActiveX from LabView.
I can get this to work if I open Excel first, then run the LabView code, but if Excel isn't manually opened first, the #NAME errors occur. It looks as though some or most functions aren't exposed to ActiveX or that a "generic" profile that doesn't have any of the addins installed is loaded when ActiveX instantiates Excel. My gut says it is the former, because when I install the VBA analysis toolpack through ActiveX, the issue still occurs.
Does anyone know a way around this? If I could find a module that performs BIN2HEX, HEX2BIN, DEC2HEX, HEX2DEC, with arguments for length so I can force a certain number of bits to show (show leading zeros on cells where I convert to binary - for example: show 0011 instead of just 11), then I could just include the module in the worksheet and it will function (from what I can tell anyhow).
Thanks in advance for any help on this!
I am having troubles getting excel to work with ActiveX. I am using LabView ActiveX and of course, Excel. I have an Excel spreadsheet that performs a number of conversions for me Hex to Binary, Binary to Hex, Decimal to Hex, etc... When I write to a range from LabView to the worksheet in Excel, it writes just fine, but all of my conversion calculations turn into #NAME errors, which obviously causes issues when I read back the values from those cells using ActiveX from LabView.
I can get this to work if I open Excel first, then run the LabView code, but if Excel isn't manually opened first, the #NAME errors occur. It looks as though some or most functions aren't exposed to ActiveX or that a "generic" profile that doesn't have any of the addins installed is loaded when ActiveX instantiates Excel. My gut says it is the former, because when I install the VBA analysis toolpack through ActiveX, the issue still occurs.
Does anyone know a way around this? If I could find a module that performs BIN2HEX, HEX2BIN, DEC2HEX, HEX2DEC, with arguments for length so I can force a certain number of bits to show (show leading zeros on cells where I convert to binary - for example: show 0011 instead of just 11), then I could just include the module in the worksheet and it will function (from what I can tell anyhow).
Thanks in advance for any help on this!