Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
formating a range of cells
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tscharf  
View profile  
 More options Oct 16, 12:15 am
From: tscharf <noisetheo...@gmail.com>
Date: Thu, 15 Oct 2009 07:15:11 -0700 (PDT)
Local: Fri, Oct 16 2009 12:15 am
Subject: formating a range of cells
I am somewhat new to xlwt, not completely new to python.

I am working on a report program, and the end user would like me to
add some formatting to it, particularly some cell boarders and
background color changes.

The background color changes are easy, and I can write them as I write
to the cells.  The bigger issue is the cell boarders, which are
intended to create a box around several cells at once.

Is there a way in xlwt to set a border around a range of cells to
group them together, rather than having to do it cell by cell?
Obviously, that can be done, but its going to be messy considering
this particular report.

Thank you,
Tony


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Machin  
View profile  
 More options Oct 16, 11:38 pm
From: John Machin <sjmac...@lexicon.net>
Date: Sat, 17 Oct 2009 00:38:19 +1100
Local: Fri, Oct 16 2009 11:38 pm
Subject: Re: [pyxl] formating a range of cells
On 16/10/2009 1:15 AM, tscharf wrote:

> I am somewhat new to xlwt, not completely new to python.

Hi Tony, and welcome to the group.

> I am working on a report program, and the end user would like me to
> add some formatting to it, particularly some cell boarders and
> background color changes.

> The background color changes are easy, and I can write them as I write
> to the cells.  The bigger issue is the cell boarders, which are
> intended to create a box around several cells at once.

> Is there a way in xlwt to set a border around a range of cells to
> group them together, rather than having to do it cell by cell?
> Obviously, that can be done, but its going to be messy considering
> this particular report.

You will need to do this cell by cell. It will help if you set up a
style aka XF for each different type of cell BEFORE you write any cells,
instead of doing it on the fly as you are writing cells. You will need 9
XFs (4 sides, 4 corners, and the middle) -- more if you have any fancy
formatting. You may end up with e.g. 3 rows of XFs (header, data, and
trailer).

Can you share your user's fancification request? I've got a few vague
thoughts on how a general purpose table formatter might look, but it
needs some stories -- anyone else out there who has done
borders/colours/patterns/number-formats etc for tabular data, please
throw your thoughts/stories/polished_code into the arena.

Cheers,
John


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google