A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/084829.html below:

ODBC, Excel DbiDate Question

ODBC, Excel DbiDate Question ODBC, Excel DbiDate QuestionBill Witherspoon billw at witherspoon-design.com
Mon Apr 16 22:32:52 EDT 2001
Hi all,

I'm trying to output a database query (Access) to an Excel Range.
If I follow Mark Hammond's book example (thanks) I get a

TypeError: Objects of type 'DbiDate' can not be converted to a COM
VARIANT

every time it runs into a date.

I tried to convert the dates using (also borrowed from Mark ;-) ):

def fixStringsAndDates(aMatrix):
    newmatrix = []
    for row in aMatrix:
        newrow = []
        for cell in row:
            if type(cell) is int:
                pass
            elif type(cell) is float:
                pass
            else:
                newrow.append(str(cell))
        newmatrix.append(newrow)
    return newmatrix

This works, but I thought I'd check with the list if there's a better
way?

TIA,
Bill.




More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4