View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal[_3_] Robert Crandal[_3_] is offline
external usenet poster
 
Posts: 161
Default Alternative to writing to a closed spreadsheet

"GS" wrote:

You treat a worksheet same as a database table. Each row is a record
(starting with row2), each col is a datafield (starting with col1). A1
would be the first fieldname (heading) in your data table (worksheet).
Each record *must have a unique ID* for referencing a specific record.
Thus you would read/write individual fields of a specific record (or
records).

Otherwise, if your worksheet isn't properly contructed as a data table
should be then you have to use range names or addresses to read/write
specific values.


The target spreadsheet does look like a table of data, with rows and
columns. How do I assign a unique ID to cell A1 in the first row or
first record? Do you have a small example of ADO code that shows how to
change cell A1 in the first row of a closed spreadsheet?

I have been looking at the example ZIP file that you provided, but so
far I'm only successful at reading from a closed workbook or appending
a new row at the bottom of a closed workbook.