Hi, Erik, and welcome ...
>
> I've been trying to get cell formatting working with xlwt based on
> this blog post http://ntalikeris.blogspot.com/2007/10/create-excel-file-with-python-my-sort.html
> - but I'm not having any luck.
A general point on asking for help: show a brief piece of code that
represents your best effort, together with a short description of what
happened when you ran the code.
> I need to make the top row of my worksheet bold.
>
> And I need to make 2 columns display negative numbers in red with
> perentheses instead of a minus sign - ($2.00) instead of -$2.00.
You need to work out a "number format" that does what you want -- so
consult the docs/help for Excel / OOo Calc / Gnumeric and fiddle around
in the GUI till you think you've got it right, then put it in your code.
> Can anyone point me in the right direction?
That blog gives examples of setting up a style with a bold font, and
with a "number format" string. You will need one style for your heading
row and one style for your red/black money amounts. For the other cells,
you can either use no style at all in the write method call, or you can
explicitly create a default style and use that. I'd use the explicit way.
> PS Does xlwt have a public site, or is it just the SVN repo?
(1) No (2) No, "it" is the SVN repo plus this newsgroup/list. Volunteers
for the xlwt marketing department and the xlwt documentation team would
be welcomed.
Cheers,
John
num_format_str is an attribute of the XFStyle class, *NOT* the Font
class. For what you are doing, you don't need to go anywhere near the
Font class.