jamesgerard1964 has asked for the wisdom of the Perl Monks concerning the following question:

Hey, I'm trying to printout to an xlsx sheet, so being large numbers where I'd like to comma separate the numbers. I can't do it via sprintf, but have gotten the variable to insert a comma using:
$ffcount = reverse join ",", (reverse $ffcount) =~ /(\d{1,3}) +/g;

However now when I do the $worksheet->write it comes out as a string as opposed to a number and it's left justified. I need it right justified.

The other question is there is a triangle in the upper left corner of each entry in the column for non-number entries. If I click on it another box appears where I can select 'Number Stored as Text', 'Convert to Number'. Does anyone know how to get rid of that. I don't have a problem storing it as a string, but right justified and without the triangle.

Replies are listed 'Best First'.
Re: Spreadsheet::WriteExcel, numbers with comma's? (set_num_format)
by Anonymous Monk on Oct 21, 2014 at 20:42 UTC