that is exactly the problem, thanks with the help of injunjoel we came up with this that worked well
my @tableProp5 = ( widths => [inches(3), inches(4)], #--> width of +each column align => 'l l', ); my @myText = ( [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], [\'\fs20\b this', 'that'], ); RTFTable(\@tableProp5, 9, 7,\@myText); $fh->close(); sub RTFTable{ my @tableProps = @{$_[0]}; my $headerColor = $_[1]; my $bgColor = $_[2]; my @Text = @{$_[3]}; my $count = 0; my $oDecl5; foreach my $aref (@Text) { if($headerColor eq undef || $headerColor eq "" || $headerC +olor == 0 || $count == 0){ $oDecl5 = RTF::Writer::TableRowDecl->new(@tableProps); $oDecl5->add_bgcolors($headerColor); # Adds backgroun +d color using color hash $fh->row($oDecl5, @$aref); $count++; }else{ $oDecl5 = RTF::Writer::TableRowDecl->new(@tableProps); $oDecl5->add_bgcolors($bgColor); # Adds background co +lor using color hash $fh->row($oDecl5, @$aref); } } }
thanks for the help and pointing me in the right direction.

In reply to Re: RTF Table function by ikkon
in thread RTF Table function by ikkon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.