"do row" fails to add rows

Asked by Sean Boyce on 2013-04-07

I'm running python 2.6 and appy 0.8.3. I'm trying to fill an ods spreadsheet with some values.

Given this in Python:

plist = [{'company': 'test', 'email': '<email address hidden>'}, {'company': 'test1', 'email': '<email address hidden>'}, {'company': 'meh', 'email': '<email address hidden>'}]

 renderer = Renderer('test.ods', locals(), 'result.ods')

This as the comment in the ods spreadsheet:

do row for company in plist

And the following two cells to the right of the comment: ="person['company']" ="person['email']"

The resulting ods document fails to add new rows. The fields are correctly replaced with whatever the last item in the dictionary plist was... so I know it's iterating through plist, but not adding a new row in each iteration.

I get an error message (summarized, it's long) in the comment field: "Syntax error for statement "Do row for person in plist". A Pod statement has the form: do {element} [{command} {expression}]. "

I'd like it to add a new row in the ODS document for each row in the dictionary "plist". Any idea what I'm doing wrong?

Thanks a lot!


Question information

English Edit question
Appy Edit question
No assignee Edit question
Solved by:
Sean Boyce
Last query:
Last reply:
Sean Boyce (sean-a-boyce) said : #1

Problem solved!

'do row for company in plist' comment was capitalized to 'Do row for company in plist' by LibreOffice.

This caused the 'do row' part to fail, pod still iterated through the list because 'for company in plist' still had correct syntax.

I'm glad it works! Pod seems like such a timesaver.