Centura & Excel

comp.databases.gupta (1995-2015)
Julien

Centura & Excel

Post by Julien » 27 May 2003, 11:55

 Posted by:  jgr...@wanadoo.fr (Julien) 

I know, this subject must have been view, review, etc...
But unfortunately, nothings in the FAQ helped myself, so I'm going to
disturb everybody :
How can we export data from a centura application to an excel sheet
?
Using DDE I guess, but tests I made are not really sucessfull.
Does anybody have a code example to export data (with DDE functions or
by a .cvs file ) ???
Any help will be helpfull :/

Sorry for my poor english,

best regards,

Julien.

Peter Popp

Centura & Excel

Post by Peter Popp » 28 May 2003, 08:20

 Posted by:  Peter Popp <peter...@t-online.de> 

Am 27 May 2003 02:55:29 -0700 schrieb Julien


Hello Julien,

we use a very simply way: write the Data from a window-table into a
file and put "," between columns, cr/lf after each row, the File is
called f.e. temp.csv and then call excel with the filename as
parameter.

even more simplyer is to copy a Table to clipboard and then insert
from Clipboard into excel.

hth

greetings
Peter Popp
email: Peter...@msc-software.de

Klaus-Dieter Remmler

Centura & Excel

Post by Klaus-Dieter Remmler » 28 May 2003, 12:05

 Posted by:  kdre...@boerner-web.de (Klaus-Dieter Remmler) 

Hallo,

there are several ways to do the job:
1. .csv files created by the application and given to Excel
Only text data can be safely transformed. Special formats like
date/time values or numbers must converted, that Excel can understand
the data. NULLs in the first rows are not so good, because Excel
converts them into empty strings.

2. Using the OLE-interface of Excel
In CTD 1.5 or higher you can generate functional classes that
represent Excel objects. Your applications grows, but it is a very
easy way to transfer data between Centura and Excel. To do the job,
you must know the OLE-Interface of Excel (as described in the VBA
documentation and used with VBS).

3. DDE with Excel
Not a so good idea, because it is an old interface and not supported
by the newer versions of CTD (CTD 2000 or higher a think). DDE is very
slow and depends on the version of Excel you are using.

4. Script technologies (our way to do the job)
Our CTD application (CTD 1.1 or higher) writes a XML-parameter file
that contains all necessary informations (e.g. connection data, query,
app, module, version, user parameters etc.). The applications calls a
script file (e.g. VBS file) and this file does the job using the
OLE-interface. The parameter file is given to the script and
interpreted by the script.
The script connects with the database, obtains the data and transfers
the data into Excel spreadsheet. All necessary data conversions can be
done in the script. I think it is the most flexible way to do the job.
Our actual implmentation uses classes to manage the basic works and
special functional classes in our apps to manage the special things of
the app.

Hope it helps
Greetings from Germany

Dr. Klaus-Dieter Remmler

Return to “comp.databases.gupta”

Who is online

Users browsing this forum: [Ccbot] and 0 guests