link to Perl/Java

  • Thread starter Thread starter Dave F
  • Start date Start date
D

Dave F

A fairly general question - what's the best way to get
data from an application into Excel where the only API
available is in Perl or Java? This would be to implement
a real-time feed of data from a CORBA based app, with
event-based updates. Any tips anyone? COM?

Thanks in advance

Dave
 
I understand that you have to get the data from somekind of a database. To do that, you normaly need an OLEDB provider for that database, and, then, you'll use ADO to get the data through recordsets
For instance, I connect to Oracle databases from Excel, like belo

...
Dim cn As ADODB.Connectio
Set cn = New ADODB.Connectio
On Error Resume Nex
cn.Open "Provider=MSDAORA.1;Password=" & Conectform.f_passw.Value & ";User ID=" & Conectform.f_user.Value & ";Data Source=" & Conectform.f_source.Valu
If Err.Number <> 0 The
MsgBox Err.Number & ": " & Err.Description, vbExclamation + vbOKOnly, "Eroare conectare baza de date!
On Error GoTo
Exit Su
End I
On Error GoTo

Dim adocmd As ADODB.Comman
Set adocmd = New ADODB.Comman
Set adocmd.ActiveConnection = c

Dim rst1 As ADODB.Recordse
Set rst1 = New ADODB.Recordse
Set rst1.ActiveConnection = c
...

What I use is a programatic solution that simply gets data from the database and puts the values in Excel sheets without having "links" that persist
Of course, besides the OLEDB provider, that came with MSOffice, I must have an Oracle client installed on the machine where I wish to run this macro

Or, having the same OLEDB Provider, you may get the data using MSQuery, without having to code that much, but that creates persistent "links" to the database

Something similary is for MSSQLServer databases (only you don't need anything like Oracle client installed
Depending on the kind of database you have to do with, there must be a way, but you have to get the info about your DB..

As for Perl or Java, those don't actually hold data (like a database), but simply access the database (or datafiles, provided there is not a DBMS), so you can't have "links" to those (like you may have links to other workbooks or databases
 
Back
Top