473,327 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

pyRTF and cells

Hello,
I have been playing around with pyRTF module for generating rtf
documents.
Its a very nice tool that fits my basic needs. However I have a problem
controlling cells in
a table.

I am not able to
1. do an align right of contents inside a cell
2. set backgroundcolor of a cell
3. I wonder if there is a property to set cell height (?)

Do you guys have any input on this?

/R

Mar 15 '06 #1
2 2456
Raja Raman Sundararajan wrote:
Hello,
I have been playing around with pyRTF module for generating rtf
documents.
Its a very nice tool that fits my basic needs. However I have a problem
controlling cells in
a table.

I am not able to
1. do an align right of contents inside a cell
2. set backgroundcolor of a cell
3. I wonder if there is a property to set cell height (?)

Do you guys have any input on this?


Yes. The correct approach is to:

a) do a Google search on "RTF specification", find the latest version of
the RTF specs, and read through them to determine whether what you want
to do is supported by RTF itself. If it is, then:

b) Ask Simon Cusack, the author of PyRTF, whether PyRTF supports these
attributes or if not, the best way to go about adding support for them, or

c) just add the features yourself to PyRTF and send Simon a copy of your
modified code.

Cheers,

Tim C

Mar 15 '06 #2
Yeah, thats a good approach.
I have been fiddling around to implement that feature in elements.py
and RTF specification from msdn
However, I have not been successful thus far.

To answer my first question:
1. do an align right of contents inside a cell

Its not possible by speficying alignment in the Cell instance

However, if you really want this feature then create a Paragraph and
then set alignment=2 for the ParagraphPropertySet object
Snippet:

p = Paragraph( ss.ParagraphStyles.Normal, ParagraphPS(alignment=2)
)
p.append(<some text here>)
c1 = Cell(p)

Mar 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sugapablo | last post by:
Can anyone help me out with some code to change three table cells (<td>) when one is hovered over? I have a calendar grid where each day is made up of three table cells and I want all three to...
5
by: mrid via DotNetMonster.com | last post by:
hi. im exporting data from a vb form to excel. i am able to create a new excel file, save and edit it without any trouble, but the formatting is giving me hell! i need to be able to show certain...
1
by: mgoold2002 | last post by:
I'm moving some code from Excel vbs into a .NET context and I'm very new to .NET. I'm trying to make this Excel vb code work in .NET. My questions are: how do I reference cells correctly using...
1
by: samn | last post by:
I wrote the following script in order to traverse an HTML table and merge the cells that have the same value across multiple rows. For some reason, however, it works for the first, third, and...
3
by: E.Doxtator | last post by:
Hi All I've been using the pyRTF module to generate some documents that I need for work. In general, the module is good, and pretty simple to use. However, I am running into a problem with...
3
by: Eric Layman | last post by:
Hi, I have a script here which will loop thru a table and check for it's background color. But it doesn't work on Firefox. The Error Inspector said "ERROR. obj.cells has no properties How...
1
by: jobs | last post by:
Can somebody tell me why Jobno and Value BoundFields are not available during the command SaveParm ? i enter text into the box for Value and hit the Save button, but all I see is the Parmvalue. ...
0
by: gggram2000 | last post by:
Hi there, I'm using microsoft visual studio 2005, with c# code. I recently downloaded GemBox which is a spreadsheet for excel. I can pass parameters through textboxes, comboboxes, labels...etc...
1
by: rytsyd | last post by:
Hi, I already have a working code where I have an application that queries to SQL then exports it to excel. It also merge cells that have the same value. The only problem I have is that it takes...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.