rows to repeat on printing

46 views
Skip to first unread message

James Paige

unread,
Mar 21, 2011, 11:32:03 AM3/21/11
to python-excel
I have just started using xlwt to generate some reports from my
program, and I am very happy with it so far, but I was missing one
feature. I can't figure out how to set rows to repeat for printing. I
was beginning to think that feature simply isn't supported.

I did a little googling and found this blog post http://blog.insightvr.com/?p=30
from back in 2008 that indicated that the blog author had crossported
that feature from pyExcellerator to xlwt, and that John Machin had
made further improvements, but had not merged the patch in yet.

That was a long time ago, so I was wondering if the feature did indeed
get merged. Maybe I am just a dope and can't find it.

John Machin, are you still active with the project? If so, do you
remember anything about this feature?

many thanks,
James Paige

John Machin

unread,
Mar 21, 2011, 1:27:52 PM3/21/11
to python-excel


On Mar 22, 2:32 am, James Paige <bob.the.hams...@gmail.com> wrote:
> I have just started using xlwt to generate some reports from my
> program, and I am very happy with it so far, but I was missing one
> feature. I can't figure out how to set rows to repeat for printing. I
> was beginning to think that feature simply isn't supported.
>
> I did a little googling and found this blog posthttp://blog.insightvr.com/?p=30
> from back in 2008 that indicated that the blog author had crossported
> that feature from pyExcellerator to xlwt, and that John Machin had
> made further improvements, but had not merged the patch in yet.
>
> That was a long time ago, so I was wondering if the feature did indeed
> get merged. Maybe I am just a dope and can't find it.
>
> John Machin, are you still active with the project? If so, do you
> remember anything about this feature?

Try doing some googling within this group.

Cloudform C

unread,
Mar 21, 2011, 1:51:21 PM3/21/11
to python...@googlegroups.com
I have written a module which will create a generator rather than reading it all at once.  This would solve your problem (I think), and allow you to interface with spreadsheets as if they were numpy arrays.  Check it out at http://sourceforge.net/projects/pyworkbooks/


--
You received this message because you are subscribed to the Google Groups "python-excel" group.
To post to this group, send an email to python...@googlegroups.com.
To unsubscribe from this group, send email to python-excel...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/python-excel?hl=en-GB.


John Machin

unread,
Mar 21, 2011, 2:41:17 PM3/21/11
to python...@googlegroups.com
On Tue, March 22, 2011 4:51 am, Cloudform C wrote:
> I have written a module which will create a generator rather than reading
> it
> all at once. This would solve your problem (I think), and allow you to
> interface with spreadsheets as if they were numpy arrays. Check it out at
> http://sourceforge.net/projects/pyworkbooks/

It's not my problem, it's the OP's problem. He wants a common heading on
each page of his OUTPUT xls when his users print it; what is the relevance
of "create a generator rather than reading it all at once"?

John Yeung

unread,
Mar 21, 2011, 3:03:29 PM3/21/11
to python...@googlegroups.com

I can't see much relevance anywhere. PyWorkbooks looks like it is a
numpy-enhanced Visual Basic for automating a running instance of Excel
(or Gnumeric), which couldn't be much further from xlwt.

It's *almost* as if Cloudform C is a bot which sends self-promotion
spam whenever it sees "Python" and "Excel" together on teh interwebs.

John Y.

Cloudform C

unread,
Mar 21, 2011, 4:39:38 PM3/21/11
to python...@googlegroups.com
I guess I was confused by his question.  The blog he linked to talked a lot about memory overhead, which is one of the primary things I tried to design to reduce.  I guess I was confused as to what he meant by "repeating rows."

James Paige

unread,
Mar 21, 2011, 4:54:57 PM3/21/11
to python-excel
Hi, John! :)
Yes, I indeed see you are still active with the project.

Yet searching further and deeper about this issue on this list, I am
not able to find any more information except that this feature was
indeed proposed before, but that the patch for it was not included,
but I didn't gain any understanding of why. Did I miss something? Is
there something more specific I should be searching for?

The threads I was able to find about this subject from back in 2008
and 2009 seemed to mostly focus on the performance pros and cons of a
different feature request which was apparently simultaneously being
discussed with the rows-to-repeat thing because the patch was
(apparently?) submitted by the same guy.

---
James Paige

James Paige

unread,
Mar 21, 2011, 5:17:07 PM3/21/11
to python-excel
On Mar 21, 1:39 pm, Cloudform C <cloudform...@gmail.com> wrote:
> I guess I was confused by his question.  The blog he linked to talked a lot
> about memory overhead, which is one of the primary things I tried to design
> to reduce.  I guess I was confused as to what he meant by "repeating rows."

Sorry to be vague about it. I should have been more specific about
what I was talking about.

In MS Excel 2003 you go to File->Page Setup, then to the "Sheet" tab
and there is a place where you can choose rows to repeat at top, which
gets a value like "$1:$1" (and there is also one for columns to repeat
at left)

That is the feature I am hoping to be able to use.

In OpenOffice calc, the same feature is located in Format->Print Rages-
>Edit

Sorry about being vague earlier (and yes indeed, that blog post was
talking about a lot of other stuff too)

---
James Paige
Reply all
Reply to author
Forward
0 new messages