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

Tab delimeted xls file

Status
Not open for further replies.

nickjar2

Programmer
Jun 20, 2001
778
US
I have a file (xls) which is tab delimited, and therefore not a true xls file (so I believe). What I need to do is:
use vba in Acc2000 to open excel in background,
save file as a true xls file.

Code I have worked out is:
dim Obj_App as excel.application
dim Obj_Work as excel.worksheet

set Obj_app = new Obj_App

And now I am stuck. Any help appreciated,

Cheers,

Nick
 
It all needs to be automated. I have some code that opens up Bus Obj, refreshes 2 reports and saves then as xls files. But when it does this, it actually saves them as tab delimited xls files, so part of the routine will have to open these files, do a save as (to convert to a real xls) and import the files into access and generate several queries.
Does that make sense?

Cheers,

Nick
 
If your code is creating tab-delimited text files, import these straight into Access rather than going via Excel. You can use TransferText (either in a macro or VBA within Access) to import the data, and specify the table you want it imported into.

If you need specific handling for the data (setting data types etc), then import the text manually the first time and save your import specification. You can then use that saved specification when using TransferText.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top