Add a column to excel from access

V

vjp2.at

I did a series of 80 searches on a million-record mdb but I forgot to request
one field. I pasted each result into excel, so the header is the field name.
Is there a way I can get access to produce the missing column?



- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
 
K

Ken Snell

You can use Automation in ACCESS VBA to open an EXCEL file, and manipulate a
spreadsheet within that file essentially the same way you can use EXCEL VBA
to manipulate a spreadsheet inside the file.

Easiest way to identify what VBA code structure and objects and methods
you'd need would be to record a macro in EXCEL as you manually "add" the
column. Then view the EXCEL VBA code and modify it to work from ACCESS.
There are many, many examples of Automation in the newsgroups; a search on
"EXCEL Automation from ACCESS" will return thousands of examples.

This "article" from my web pages shows how to use Automation to write data
from ACCESs into EXCEL columns; it should also give you some starting
points/ideas:
Write Data From a Recordset into an EXCEL Worksheet using Automation (VBA)

http://www.accessmvp.com/KDSnell/EXCEL_Export.htm#WriteRstFile
 
V

vjp2.at

Might I be able to do something like:

=SQL.REQUEST(c:\dog.mdb,Select tag from dog where paw=a2)

All the refs I've seen are too confusing with mutliple references to
the database and so on.

Of course I will use quotes and ampersnad to build the query string...


- = -
Vasos Panagiotopoulos, Columbia'81+, Reagan, Mozart, Pindus, BioStrategist
http://www.panix.com/~vjp2/vasos.htm
---{Nothing herein constitutes advice. Everything fully disclaimed.}---
[Homeland Security means private firearms not lazy obstructive guards]
[Urb sprawl confounds terror] [Phooey on GUI: Windows for subprime Bimbos]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top