Board index » delphi » Delphi 2 to Excel

Delphi 2 to Excel

Can Delphi 2 Send and Recieve info to Excel 95 workbooks
 

Re:Delphi 2 to Excel


Check the following site http://sunsite.icm.edu.pl/delphi/index.htm
there you will find what you need.
Quote
Chris Luck wrote in message <6p1c8v$j...@forums.borland.com>...
>Can Delphi 2 Send and Recieve info to Excel 95 workbooks

Re:Delphi 2 to Excel


Delphi 2 has a sample ActiveX component (in ActiveX palette, glyph with
blue grid and a violet 'V'). It can cope with Excel workbook (Excel 5 or
below).

The official version info can be got from http://www.visualcomp.com.

I'm using it too (version 4, support Excel 95 or below).
The coming version 6 will support Excel 97!

Regards,
Wilson.

Quote
Chris Luck wrote:

> Can Delphi 2 Send and Recieve info to Excel 95 workbooks

Re:Delphi 2 to Excel


You can use OLE Automation to upday worksheets in Excel.  If you want to
export data to Excel use the Excel ODBC driver.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Delphi 2 to Excel


Thanks Bill
Can you point in the direction of examples and lists of commands/syntax
required and the differences between OLE ActiveX and ODBC
Chris

Re:Delphi 2 to Excel


The following is some information that has worked for me using the MS ODBC
driver.
----------------------------------------------------------------------------
To read an Excel worksheet:

Create an ODBC DSN that points to the worksheet.

Excel files will not appear in the TTable.TableName property drop-down.
Enter the worksheet file name with no extension followed by a $ in the
TableName property.  You can optionally append a cell range.  For exmaple:
projects$A2:J1000

To read all of the rows in the worksheet when specifying a cell range make
the ending row number larger than the last possible row.
----------------------------------------------------------------------

There was a series of articles in Delphi Informant around the middle of last
year on using Word, Excel and Access via OLE Automation.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6p6339$nu...@forums.borland.com>...
>The following is some information that has worked for me using the MS ODBC
>driver.
>---------------------------------------------------------------------------
-
>To read an Excel worksheet:

>Create an ODBC DSN that points to the worksheet.

How do I create That?

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6pb7hi$...@forums.borland.com>...
>Go to Control Panel and double click 32bit ODBC.

>--
>Bill

I Setup the following Data Source in 32ODBC:

Data Sources Page:
    Add Data Source,
        Microsoft Excel Driver (*.XLS)
        Datasource NAme : 'My Datasource'
        Database:    only gives 2 choices a) FoxPro2.6
                                                                   b)
Foxpro2.5
        WorkBook : 'c:\ACD.xls

Do I now need to set up BDE and if so what do I do

Thanks, Chris

Re:Delphi 2 to Excel


You do not need to set up anything in the BDE.  Your 32 bit ODBC DSN should
appear as an alias in Delphi.  For example, if you drop a TTable on a form
or data module you should see the DSN in the drop-down list for the
DatabaseName property.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6pj5no$a6...@forums.borland.com>...
>You do not need to set up anything in the BDE.  Your 32 bit ODBC DSN should
>appear as an alias in Delphi.  For example, if you drop a TTable on a form
>or data module you should see the DSN in the drop-down list for the
>DatabaseName property.

I appreciate your patience Bill,

I have now done the above using "ACDXL" as the DSN which appears as an alias
in the TTable.databasename property,and I then enter Sheet1$ in the
TableName property and when I attempt to make the table active, I get the
following error:

"Your application is not enabled for use with this driver. Alias: ACDXL"

Excel ODBC driver version : 3.40.2829
Excel V7

Thanks
Chris

Re:Delphi 2 to Excel


I am not sure what the problem is.  Note that I have never done this with
D2, just with D3 C/S. What version of D2 are you using?

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6pluru$e...@forums.borland.com>...
>I am not sure what the problem is.  Note that I have never done this with
>D2, just with D3 C/S. What version of D2 are you using?

Version 2.0, maybe it's time I upgraded to D4.
btw I just downloaded BDE 5 and it seems to work OK with MSACCESS Parameters
in Stored Procedures now in that I can see the results in a DBGrid, but when
I compile and run Delphi just hangs in run mode without showing the form.
Could this be a Delphi Version problem as well?
thanks Bill

Re:Delphi 2 to Excel


Sorry.  I was not clear.  I wanted to know if you are using the Standard,
Professional or C/S version of D2.

I really do not know if your stored proc problem is a version problem or not
but it is certainly possible.  Obviously D2 was not tested with BDE 5<g>.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6po5q8$h...@forums.borland.com>...
>Sorry.  I was not clear.  I wanted to know if you are using the Standard,
>Professional or C/S version of D2.

Delphi 2.0 Desktop

Chris

Re:Delphi 2 to Excel


Quote
Bill Todd (TeamB) wrote in message <6po5q8$h...@forums.borland.com>...
>Sorry.  I was not clear.  I wanted to know if you are using the Standard,
>Professional or C/S version of D2.

>I really do not know if your stored proc problem is a version problem or
not
>but it is certainly possible.  Obviously D2 was not tested with BDE 5<g>.

>--
>Bill

I have now done the above using "ACDXL" as the DSN which appears as an alias
in the TTable.databasename property,and I then enter Sheet1$ in the
TableName property and when I attempt to make the table active, I get the
following error:

"Your application is not enabled for use with this driver. Alias: ACDXL"

I'm also getting the same message when I try to connect to MsAccess ODBC
rather than the native driver.

This all seems too hard, surely D2 can connect to the ODBC drivers.

Go to page: [1] [2]

Other Threads