[Zope] updating excel as an odbc datasource

Casey Duncan c.duncan@nlada.org
Fri, 16 Nov 2001 10:10:12 -0500


On Thursday 15 November 2001 06:22 pm, Meilicke, Scott allegedly wrote:
> Hi all,
>
> I'm using excel as an odbc datasource, and my customer needs to be able to
> update the excel spreadsheet.  However, when zope has connected to the
> database connector, I can not open the file read/write, nor can I replace
> the file with another.  Read-only is checked on my odbc driver.
>
> Any thoughts on how to get around this?
>
> My connection string is just the name of the odbc connector - is there a
> 'read only' flag I can send it?
>
> Thanks - Scott

I don't know that an ODBC driver could write to an excel file, since excel 
isn't really a database, at it doesn't really support SQL. I would suggest 
that you implement this differently. Here are two suggestions:

1. Have Zope generate a csv (Comma separated values) file from the data. This 
can be read by Excel or imported using a macro. The disadvantage to this is 
that you do not have much formatting control.

2. Create a separate database that Zope can write to (MySQL or even Access). 
Then hook excel to this database via ODBC. This is more complex, but probably 
will give you the most flexibility.

hth,
/---------------------------------------------------\
  Casey Duncan, Sr. Web Developer
  National Legal Aid and Defender Association
  c.duncan@nlada.org
\---------------------------------------------------/