Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default External data sources in Excell...

Hi,

I have to write a few Excell functions manipulating on
external data sources which are standard DBF tables. The
functions should create an Excell library.
For example: the DBF table C:\My documents\Invoice.dbf
contains the field InvAmount. I would like to sum it for a
given range of records and the result put in an Excell
cell.
How to do it or where I could find something helpful.
Visual Basic for Application doesn't contain suitable
functions.

Thanks in advance,
George
  #2   Report Post  
Posted to microsoft.public.excel.programming
Den Den is offline
external usenet poster
 
Posts: 16
Default External data sources in Excell...

I have not worked with DBF tables before but I can tell you one way it is
done with Access tables (MDB) or SQL. In Access you would first build a
query that does the sum (or whatever) that you want. You can then use
Excel's Get external data wizard to pull the data from that query.

So if you can build queries in the DBF files and if you have an ODBC driver
in Excel to connect to those Queries, you can get the data you want.

Hope that helps.
Dennis


"George" wrote in message
...
Hi,

I have to write a few Excell functions manipulating on
external data sources which are standard DBF tables. The
functions should create an Excell library.
For example: the DBF table C:\My documents\Invoice.dbf
contains the field InvAmount. I would like to sum it for a
given range of records and the result put in an Excell
cell.
How to do it or where I could find something helpful.
Visual Basic for Application doesn't contain suitable
functions.

Thanks in advance,
George



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default External data sources in Excell...

There are many ways to achieve this. One which may be of interest is
to use the
'SQL' functions in the ODBC add-in which ships with pre-Office2003
versions of Excel (but can still be download from MSDN, AFAIK). Look
in the help for SQLOpen, SQLClose, SQLExecQuery, SQLRetrieve etc.

If you are happy using VBA code, you will need a data access component
which is beyond the functionality of the VBA library (that's why
Visual Basic for Application doesn't contain suitable functions).
Check out ADO:

http://msdn.microsoft.com/library/de...tlibraries.asp

--

"Den" wrote in message ...
I have not worked with DBF tables before but I can tell you one way it is
done with Access tables (MDB) or SQL. In Access you would first build a
query that does the sum (or whatever) that you want. You can then use
Excel's Get external data wizard to pull the data from that query.

So if you can build queries in the DBF files and if you have an ODBC driver
in Excel to connect to those Queries, you can get the data you want.

Hope that helps.
Dennis


"George" wrote in message
...
Hi,

I have to write a few Excell functions manipulating on
external data sources which are standard DBF tables. The
functions should create an Excell library.
For example: the DBF table C:\My documents\Invoice.dbf
contains the field InvAmount. I would like to sum it for a
given range of records and the result put in an Excell
cell.
How to do it or where I could find something helpful.
Visual Basic for Application doesn't contain suitable
functions.

Thanks in advance,
George

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection to external data sources in Excel Thomas Wellington Excel Discussion (Misc queries) 0 March 1st 07 05:44 PM
Importing External data from various sources [email protected] Excel Discussion (Misc queries) 3 January 19th 07 10:19 PM
Why can't I edit my external data sources? jcoburn Links and Linking in Excel 0 March 29th 05 04:40 PM
Why can't I edit my external data sources? jcoburn Links and Linking in Excel 1 March 12th 05 08:44 AM
Why can't I edit my external data sources? jcoburn Excel Discussion (Misc queries) 0 March 11th 05 03:31 PM


All times are GMT +1. The time now is 01:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"