Read data from Closed .xls file

  • Hi!Need to read data from file #1 to file#2.
    Way I am doing it now is:

    'open the file as active file
    Workbooks.Open Filename: = "Full Path to the File"
    'Do whatever should be done.. calculations, filtering, formatting
    'Close File

    This way file is remained opened( active) while reading is done...

    I was wondering if there is a way to read data from the file without visually opening it?


  • You could use MS Query to get the data. You will have to name the database range in the source file. Then in the destination file, choose Data>Get External Data>New Database Query. You can let the query wizard create your query (easy), or do it manually (infinitely more flexible). If you've used Access at all, the process for building a query in MS Query will not be foreign to you.

  • Thanks :)

    fifijazz,thanks for the tip -'Get External Data' completely skipped my mind :).
    XL-Dennis,WOW... just looked at the code in one of the the meantime ( if will be stuck with the solution) can I address you personally?


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!