[AccessD] Export to Excel

Gustav Brock gustav at cactus.dk
Mon Feb 10 11:16:00 CST 2003


Hi John

>>An additional trick is to use named ranges in the Excel sheet. These can be
>>attached as tables to the Access app which means that you can write directly
>>to these from your query or code in Access.

> Oooooohhhhhh.  Tell us more!

> I am basically Excel ignorant.  Can you publish a little demo of how to do
> this?

First open your workbook and assign (create) a named range or two.
Save and close.
Open Access and choose to attach a table. Choose .xls as file type and
pick your workbook.
Now the attach wizard shows a dialog. Upper left are radio buttons to
select to attach either sheets or named ranges. Choose named ranges,
and your newly created named ranges show up in the listbox. Pick one.

Now you have an attached table you can write and append to.
But you cannot delete rows; instead you'll need to run a loop that
erases the rows.

/gustav




More information about the AccessD mailing list