12-18-2006 09:46 AM
12-19-2006 06:43 AM
12-19-2006 08:04 AM
12-19-2006 11:27 AM
Hello Julia!
In general this should be no problem. It is unfortunate that this does not apply to the NI Excel TDM AddIn
The AddIns can be accessed via the ComAddIns collection. After connecting you can get a object, wich should expose a scriptable interface to the AddIn features. In this case it should be at least a Load method with the filename as parameter.
The following script shows how to find the right AddIn and get the object interface (or nothing if not implemented). You can run it in DIAdem:
Option Explicit
Dim oExcel
Dim oComAddIn
Set oExcel = CreateObject("Excel.Application")
For Each oComAddIn In oExcel.COMAddIns
If oComAddIn.ProgId = "ExcelTDM.TDMAddin" Then
oComAddIn.Connect = True
If Not oComAddIn.Object Is Nothing Then
' use the object interface here
Else
MsgBox "No object interface available! :-((("
End If
End If
Next
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
12-19-2006 01:56 PM
12-19-2006 02:26 PM
Hello David!
Where is the TDM AddIn automation in your example?
I only can find a data copy cell by cell. A verry slow aproach if you have a lot of data! You can do it much faster with some hidden features of Excel, but if you have verry much data the AddIn is still faster.
Matthias
Matthias Alleweldt Project Engineer / Projektingenieur | Twigeater? |
12-19-2006 02:34 PM
04-12-2007 02:23 PM
This will open Excel and run the 'TDM Importer'. Run this code in Diadem...
04-20-2007 04:25 AM
09-10-2009 03:30 AM
There is a new version of the TDM Add-in for Microsoft Excel available which now includes a COM-API. This API allows you to automate or remotely control the TDM import.
Please find the new Add-in at:
http://zone.ni.com/devzone/cda/tut/p/id/4906
A description of the COM interface can be found at:
http://zone.ni.com/devzone/cda/tut/p/id/10207
Greetings,
ThomAC