LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default Import xls file into Excel using VBA

Hi all,

I'm positive someone can help me, because I've seen people hint at the
answer. Unfortunately, I just haven't found a code example.

I have an excel file that I'm writing a macro for. What I want to do is
have the user select a file (I used Application.getOpenFilename) and then the
macro will append the data from the selected file to the bottom of a specific
worksheet.

I tried using DAO objects to read the file, but I get error "3274: External
table is not in the expected format".
Code is:
Dim excelFile as DAO.Database
Set excelFile = OpenDatabase(FileName, False, False, "Excel 8.0;")
I'm not sure what could be the problem with the file, as it's just a
standard Excel file. I'm not aware of any issues with the data in the
worksheet.

If I was importing a CSV file, I could find lots of examples, but I'm
striking out with the excel to excel. If anyone can point me in the right
direction I'd appreciate it.

Thanks,
Jay
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I import text file of cash flow to excel file then use formula Bumpa Excel Discussion (Misc queries) 2 May 28th 10 04:22 PM
import file so that it is a actual csv file, no excel cell version broncoburt New Users to Excel 1 November 21st 09 09:09 PM
import data from txt file to an existing excel file shaji Excel Discussion (Misc queries) 1 September 12th 09 04:15 PM
How come I can't import an .svc file(Open Office) to Excel file? beezer Excel Discussion (Misc queries) 1 August 28th 06 12:05 AM
Import text file into excel with preset file layout, delimeters VBA meldrape Excel Programming 7 June 15th 04 08:31 PM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"