Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Writing Excel Spreadsheets -- suggestions sought

by glenn (Scribe)
on Sep 13, 2013 at 14:08 UTC ( #1053945=note: print w/replies, xml ) Need Help??


in reply to Writing Excel Spreadsheets -- suggestions sought

Not sure what your collecting or how the excel module works but could you not just watch for the longest string length and use that value at the end?
my $col_width = 10; #default ...#code if (length($variable) > $col_width) { my $col_width = length($variable); } #set column width

Replies are listed 'Best First'.
Re^2: Writing Excel Spreadsheets -- suggestions sought
by SuicideJunkie (Vicar) on Sep 13, 2013 at 14:24 UTC

    The trick is in determining the width of the text in pixels/"inches" rather than characters, so you can set the column width.

    However, there's an easy solution to that; set the text in that column to be a fixed-width font.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1053945]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2022-01-18 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (52 votes). Check out past polls.

    Notices?