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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

too many fields problem when importing

Status
Not open for further replies.

t9914

IS-IT--Management
Jun 11, 2002
4
FI
Hi,

I have a problem when I try to import Excel worksheets. I would like to import more than one Excel file's different worksheets(/TABs) in time.(but I suppose it is impossible) So, I have to import those by TAB name.

Problem is that when I use TAB name like this:

DoCmd.TransferSpreadsheet acImport, 8, "Trial Code", "O:\RTD\LABRA\PM1\LABRA\" + Taulukko(R), False, "Massatiedot!"

I get this error message (too many fields defined). Because of that TAB name I use, I can't use "range". I would use range if I wouldn't have to use TAB name to specify sheet.

Is there any other way to deal with this problem?

Thanks in advance...and sorry about my english

Jari
 
It depends largely on the complexity of the shets, but you can generally write a module to either view the spreadsheet data as a CSV file and read the Rows/Columns into text and then move them into whatever attangement you want in tables, or just open the spreadsheet directly from Ms. A and read either named ranges or cell addresses.

Since I am a big (NOT) fan of spreadsheets, I do NOT keep current with the specifics, so others would be much better at helping you w/ the details.


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Thanks MichaelRed,

Now could someone give a little hint how those things could be written in vba?
 
Since I am a big (NOT) fan of spreadsheets, I do NOT keep current with the specifics, so others would be much better at helping you w/ the details.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top