Here is a simple Tk example. I've just put the row-col numbers in the cells, but you could load $cells{$row}{$col}{'data'} with your spreadsheet output and use that for the text. It is also possible to change fonts, cell colors, text color, etc. When you click the png-output button, be patient, it may take a second or 2.
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::WinPhoto; use Tk::PNG; my $mw = tkinit; my $width = 500; my $height = 700; my $canv = $mw->Canvas(width => $width, height =>$height)->pack(); #set cell size adjustment my $x = 50; my $y = 20; my $rows = int( $height / $y + 1 ) - 1; #make it 0 based my $cols = int( $width / $x + 1 ) - 1; print "rows->$rows cols->$cols\n"; my %cells; foreach my $row ( 0 .. $rows ) { foreach my $col ( 0 .. $cols ) { $cells{$row}{$col}{'rect'} = $canv->createRectangle( $col * $x, $row * $y, $col * $x + $x, $row * $y + $y, #-width => 1, -outline => 'white', ); $cells{$row}{$col}{'text'} = $canv->createText( $col * $x + $x/2 , $row * $y + $y/2, -text => "$row - $col", -anchor => 'center', -fill => 'black', ); } } my $canvbutton = $mw->Button(-text=>'Canvas Capture', -command => \&canv_capture, )->pack; MainLoop; ########################################################## sub canv_capture{ my $image = $mw->Photo(-format => 'Window', -data => oct($canv->id) ); my $pathname = './canvas.'.time.'.png'; $image->write($pathname, -format => 'PNG'); } ##############################################################

I'm not really a human, but I play one on earth. flash japh

In reply to Re: What would you guys recommend for generating graphic-based output? by zentara
in thread What would you guys recommend for generating graphic-based output? by FrankRizzo

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.