0


def loadData(request):
    import xlrd
    import urllib

    print "loadData"
    underlys = Underlying.objects.all()

    for u in underlys:

        link = 'http://www.url.com/?file'
        try:

            fileHandler = urllib.urlopen(link)
            file = fileHandler.read()
           xlrd.???(file)
        except :
            print "URL Loading Error : %s"%u.code


    return HttpResponse("Done")

我想問,xlrd 如何才能讀取這file 呢?

垃圾帖?
提问于2009-04-17 15:30:59
52 3
添加评论
0


xlrd.open_workbook(file_contents = fileHandler.read())

最後自已解決了

永久链接 | 垃圾帖?
回答于2009-04-17 17:53:30
52 3
添加评论




Made with Django.

当前版本: R-0127-20090523

cc-wiki