Reading Excel files 
Author Message
 Reading Excel files

Can any one tell me a way of reading XLS files and putting data into Access or
DBF files. I have Access, VB and Delphi.

Thanks

Kym Wilson



Sat, 07 Nov 1998 03:00:00 GMT  
 Reading Excel files


Quote:

> Can any one tell me a way of reading XLS files and putting data into Access or
> DBF files. I have Access, VB and Delphi.

> Thanks

> Kym Wilson

Hi Kym,

Unless I misunderstand your question, this is a fairly straightforward task.
MS Access can directly import/export both Excel files and dBase files.  With
your Access database open, select File|Import or File|Export.

Or are you trying to do this from within a Delphi program?  If so, you will
need to use ODBC.  You can set up an ODBC driver to connect to an Excel
spreadsheet (I think you need a database range defined in the xls file).  Then
use ODBC to connect to the Access database, or BDE to connect to the dBase
database.  Getting things working with ODBC is often non-trivial.

If you only want to do this once, use the import/export features of Access.  
If you want a Delphi program to accomplish the same thing, you will need to
use ODBC.  Obviously, the latter method will involve considerably more work.

Hope this helps,
Craig

--
-----------------------------------------------------------------------------
Craig Jackson               "No matter how great your triumphs or how

Electronic Data Systems      Chinese couldn't care less."    -  Lazlo



Mon, 16 Nov 1998 03:00:00 GMT  
 Reading Excel files

Thanks to Craig and others who replied to this. My conceptual problem was that
the one field was split between 3 separate columns in the spreadsheet. However
Access will just label the fields derived from the columns as 1, 2, 3 etc.
which can then be renamed to a,b,c etc. and exported to dbfs. The rename is
required since numbers get replaced by the underscore character and all become
'_' and a duplicate field error occurs.

I then can interpret colum a, e and i etc. as the same field.

Quote:


>> Can any one tell me a way of reading XLS files and putting data into Access o
>> DBF files. I have Access, VB and Delphi.
>Unless I misunderstand your question, this is a fairly straightforward task.
>MS Access can directly import/export both Excel files and dBase files.  With
>your Access database open, select File|Import or File|Export.



Wed, 18 Nov 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. reading excel files

2. HELP : Reading EXCEL file by Turbo Pascal

3. Read Excel files?

4. Read Excel files?

5. Reading Excel Files thru ODBC

6. Reading Excel files in BPW

7. How to read excel file content into a table with Delphi 4?

8. How to read a EXCEL.XLS file ?

9. Reading Excel 97 files with D2

10. Can Excel read a Pascal binary file?

11. Help : Anyone know how to read/write from/into Excel files

12. how to read a value with excel select

 

 
Powered by phpBB® Forum Software