Negative numbers formatting in xlwt

13 views Asked by At

I have a problem with formatting of negative numbers in an Excel document.Current formatting is easyxf('borders: left 1, right 1, top 1, bottom 1; align: horiz right, vert center', num_format_str='### ### ### ### ### ##0.000'), when the value is negative the minus is too far from the numbers. In Excel, the format is '###\ ###\ ###\ ###\ ###\ ##0,000' I tried changing num_format_str to '### ### ### ### ### ##0.000;-### ### ### ### ### ##0.000' but it didn't work. It works if the Excel format is displayed without slashes, but how do I change the num_format_str to get correct formatting in Excel?

0

There are 0 answers