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

Hi Monks,

I am using excel:: writer::xlsx module for generating an excel report. When I am using write_string function for writing, if data is number format on a cell then it’s showing green mark while open the excel sheet.

My question is there any way through which I can remove this exclamation green color mark after generating a excel report programmatically in Perl.

Thanks in advance

  • Comment on Excel file format problem Generated by Excel::writer::xlsx moduls

Replies are listed 'Best First'.
Re: Excel file format problem Generated by Excel::writer::xlsx moduls
by jmcnamara (Monsignor) on Nov 09, 2012 at 12:03 UTC

    It isn't currently possible to turn off those warnings from Excel::Writer::XLSX. I'll add it in a future version.

    In the meantime, you can try avoid the warning by using write_number() for numbers or write() which tries to distinguish between strings and numbers and use the correct method.

    --
    John.

Re: Excel file format problem Generated by Excel::writer::xlsx moduls
by bitingduck (Deacon) on Nov 09, 2012 at 09:01 UTC

    If you click on the green mark, Excel will probably give you a message letting you know that the cell contains a number in text format. Try doing "write_number" for those cells, instead of "write_string". Excel can be very annoying about how it deals with text formatted numbers. How it deals with time formatting is even worse...