[Zope] SQL to Excel

Thomas B. Passin tpassin@mitretek.org
Thu, 2 May 2002 11:24:15 -0400


[Bruce Dykes]

> Okay, I'm trying to publish the data from an excel spreadsheet via an ODBC
> connection.
>
> The connection starts okay, and I found this SQL snippet from a Java site:
>
> select URL from [qas$] where Month='March' and Year=2000
>
> Note that the table name is the name of the worksheet with a $ appended to
> the end. You have to append the $ in order for the query to work. Why?
> Because. The brackets are there because $ is a reserved character in SQL.
> Life is never easy.
> -----------------------
>
> Now all I want to do is SELECT *...I don't need anything fancier than
that,
> I'm just trying to publish the entire worksheet. No variation on the above
> code snippet seems to work.
>
> Has anybody gotten SQL queries into excel to work? And how did you do it?
>
> thanks in advance
> bkd
>
> As an aside, I'm currently publishing this document via Apache, with an
> excellent program, xlhtml set up as a handler....but that's proven less
than
> useful as of late.

I just tried in using your syntax.  It worked fine.  By that, I mean that
the Test tab of the connection page returned a reasonable-looking result
when I typed

select * from [land$]

into the query box (here, "land" is the name of the worksheet).

I am using Zope 2.3.3 on Win2000.

Maybe you better say what you mean by "[doesn't] seem to work".

Cheers,

Tom P