Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado and Excel

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
GB
I am trying to find the dsnless connection string to open an excel file. The dataform wizard does not seem to be very helpful.

After that I need to do the same thing for a text file. Peter Meachem
peter@accuflight.com
 
As no-one bothered to answer, I've had to do it myself.

Another problem. When reading the Access mdb, I used OpenSchema(adSchemaTables) to list the tables, and then OpenSchema(adSchemaColumns) to list the fields. In Excel, the first lists the Sheets, and the second the contents of the columns. Don't use Excel myself, so how can I get adSchemaColumns to read the Names of the columns, and how can I name them? Peter Meachem
peter@accuflight.com
 
mm, now I'm really stuck. I found how to name the columns (Indert/name/Define) and now I get my column names + Sheet1$ etc. Ideally I suppose I should select the sheet and then list the names. Anyone done this from VB. Please Peter Meachem
peter@accuflight.com
 
I'd like to help, but I don't think I'm clear on what you are trying to accomplish.
 
What I am actually trying to do is to use various datasources for a programme. users supply their own data in whatever format, and the programme is supposed to be able to sort it out. Suppose the data is Access. I need to let them choose a database, choose a table or query. They then need to map the fields, so I know that FieldA is really the first name and Field3 + Field4 + Field5 is really the address. Then I can either import or use the mdb directly.

Done all that, easy peasy (sort of).

I also need to do the same thing using Excel so the the programme can identify which columns represent which bits of info. I'm kind of halfway there currently. My last problem was in differentiating betwen sheets and columns, as they both seem to be described as tables.

Does that make more sense. I'm off to bed now (midnight) , will check in the morning.
Peter Meachem
peter@accuflight.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top