Importing rather than opening XLS
Discussion
Is there a quick method to import an XLS doc into Excel without opening the actual file?
I want to be able to use my existing xls doc and import another xls into it, but not use:
Workbooks.Open FName
Do I have to go in and import it row by row just to get past this or is there another way round it??
In the same query if I needed to import sheet2 of a workbook into my xls file, how would I do that progamatically.....
5 days and I don't need to touch this system ever again!!!
Cheers for any help.
I want to be able to use my existing xls doc and import another xls into it, but not use:
Workbooks.Open FName
Do I have to go in and import it row by row just to get past this or is there another way round it??
In the same query if I needed to import sheet2 of a workbook into my xls file, how would I do that progamatically.....
5 days and I don't need to touch this system ever again!!!
Cheers for any help.
atomicrex said:
If you are able to write VBA code then you always create an ADO connection.
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
if you have some examples I would be most grateful..
Cheers
XLS documents are a structured, uhm, mess. There's no easy way of just reading the data for a range without opening the whole damn file first. It would be possible to write something to do this, but it would be reinventing the wheel, as that is what Excel itself does. I'd be a little surprised if opening the workbook and copying data from it was any less efficient than treating it as a data source and using ADO, as I suspect the ADO route is itself just a thin wrapper sitting on top of the same Excel code. I could well be wrong, but I'd definintely look at memory consumption and performance for both metgods before plumping for ADO.
ProPlus said:
atomicrex said:
If you are able to write VBA code then you always create an ADO connection.
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
if you have some examples I would be most grateful..
Cheers
PM me and I will send you some examples
atomicrex said:
ProPlus said:
atomicrex said:
If you are able to write VBA code then you always create an ADO connection.
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
Its a good way to read the data, however dont ever try and use an ado recordset to query a range within an open book. It is impossible to close the damn thing!!!
Need any help just ask ive loads of examples
if you have some examples I would be most grateful..
Cheers
PM me and I will send you some examples
YHM
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


