Now. You need to open(...) the file and process using python-excel

Something like:

fname = db.table[id].filefield

with open("/uploads/%s"%fname) as f:
   #look for python-excel in google to process the file here.
   x = xlwt.open(f)


http://zerp.ly/rochacbruno
Em 16/09/2011 05:47, "António Ramos" <[email protected]> escreveu:
> its under upload folder with a "strange name".xls
>
> 2011/9/16 Bruno Rocha <[email protected]>
>
>> is your file stored as a BLOB or a regular file under /uploads folder?
>>
>>
>> 2011/9/15 António Ramos <[email protected]>
>>
>>> hello,
>>> i receive a file via xmlrpc
>>> this is my function
>>>
>>> @service.xmlrpc
>>> def checkflow(file,name):
>>>
>>>
db.image.insert(file=db.image.file.store(cStringIO.StringIO(file.data),name))
>>> return "ok"
>>>
>>> It is working as expected.
>>>
>>> Now i want to open the file and process every line
>>>
>>> how do i code the opening of the file ?
>>>
>>>
>>> thank you
>>>
>>
>>
>>
>> --
>>
>>
>>
>> --
>> Bruno Rocha
>> [ About me: http://zerp.ly/rochacbruno ]
>> [ Aprenda a programar: http://CursoDePython.com.br ]
>> [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
>> [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
>>
>>

Reply via email to