OK, but I believe you have another problem, in the statement
db[table].insert(field=sh.cell_value(row,col))
field here is evaluated as 'field' not as the content of the field
variable
so you are setting a field named 'field' to the content of the cell,
you would have to do:
db[table].insert(** {
ok, I solved my problem :) , I missed a )
thank you
On 19 Tháng Ba, 20:51, tandnk50 wrote:
> ok, this is my action code. I want import data
>
> def read_xls():
> exec('import applications.%s.modules.xlrd as xlrd' %
> request.application)
> import os
> path=os.path.join
> (request.fold
On Fri, Mar 19, 2010 at 7:51 AM, tandnk50 wrote:
> ok, this is my action code. I want import data
>
>
> return dict(students=studens)
>
you have dict(students=studens) - mispelled second students.???
-wes
--
You received this message because you are subscribed to the Google Groups
"
ok, this is my action code. I want import data
def read_xls():
exec('import applications.%s.modules.xlrd as xlrd' %
request.application)
import os
path=os.path.join
(request.folder,'private','a_dummy_file_name.xls')
book = xlrd.open_workbook(path)
sh = book.sheet_by_index(0)
Can you show the action's whole source?.
On Mar 19, 9:38 am, tandnk50 wrote:
> I'm sorry .
> But my above code writeen in a action, the 'return dict()' is for the
> action
>
> On 19 Tháng Ba, 20:34, DenesL wrote:
>
> > return may only occur syntactically nested in a function definition,
> > you
I'm sorry .
But my above code writeen in a action, the 'return dict()' is for the
action
On 19 Tháng Ba, 20:34, DenesL wrote:
> return may only occur syntactically nested in a function definition,
> you don't have one.
>
> On Mar 19, 9:06 am, tandnk50 wrote:> I wrote
> statements but invalid sy
return may only occur syntactically nested in a function definition,
you don't have one.
On Mar 19, 9:06 am, tandnk50 wrote:
> I wrote statements but invalid syntax and i don't know the problem,
> for example :
>
def func():
for i in range(3):
> for j in range(2):
> if i>1 :
>
7 matches
Mail list logo