|
-
Jan 10th, 2004, 03:06 PM
#1
Thread Starter
New Member
Open Excel From VB (to display a text file)
I have a tab-delimited text-file which I want to allow user to view in Excel. How can i Do that?
I had a few thoughts:
1) rename the text file to .xls(i used ms-dos). Then I could open the file from VB using GetObject(). Excel opens fine. But problem is dunno how to copy or rename files from VB (instead of going manually to ms-dos)
2) open excel, wkbk, wksheets and populate data one-by-one using recordset. But i realise that that when using recordset, we need to know the flds involve....my text file is a matrix (rows and columns) data file...and i have no knowledge of the size...thus can't know how many flds involve.
Any help is appreciated.
3) or is there a way to open text file in excel (control from VB of cos) automatically??
Thanks in advance....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|