title: Specific number FORMAT mask like #,###,##0.0### that would force Excel GENERAL NUMBER format?
body: <p>What custom format mask will display 3.0 as 3 and 3.10 as 3.1?</p>
  
  <p>I am trying to support a Cognos report that uses custom SQL that selects from an Oracle column that is defined as NUMBER(11, 4). if I do not apply any formatting to the.1 column on the report, the resulting Excel column has "Number  " category formatting applied  with 4 decimals.</p>
  
  <p><img src="https://i.stack.imgur.com/yPZNX.png" alt="enter image description here"></p>
  
  <p>As a result, I see the following sample formatted values displayed:</p>
  
  <pre><code>a) 4,123.3400
  b) 4.0123
  c) 4.0100
  d) 3
  e) 0.10000
  </code></pre>
  
  <p>I would prefer to see only significant zeros afer the decimal point displayed. For example, 4.0100 should be 4.01 but otherwise the formatting is fine. When the number is a whole number, I prefer not to display a decimal point at all. For example, 3 is preferable to 3.0 for values with no fractional part.</p>
  
  <p>I tried experimenting with custom formats and the closest that I can come to what I am looking or is this format</p>
  
  <pre><code>#,###,##0.0###
  </code></pre>
  
  <p>which produces:</p>
  
  <pre><code>a) 4,123.34
  b) 4.0123
  c) 4.01
  d) 3.0
  e) 0.1
  </code></pre>
  
  <p>There are two differences between using no format, the first example and my custom format:</p>
  
  <ol>
  <li>Whole numbers are displayed with one zero after the decicimal (d) </li>
  <li>Trailing insignificant zeros after the decimal are suppressed. (a)</li>
  </ol>
  
  <p>What I woold like to see is the following, the difference with the opreceding example is that whole numbers are displayed without any decimal (d):</p>
  
  <pre><code>a) 4,123.34
  b) 4.0123
  c) 4.01
  d) 3
  e) 0.1
  </code></pre>
  
  <p>Excel acheives this by default with its "General" format, however, the trick is trying to get Cognos to produce that setting using custom SQL that selects from a NUMBER(11, 4) column. As mentioned above,  going with the default format results in Excel output that uses the General format but has 4 decimal places, so I get 4 decimals of precision if there is any faction part. The csolution appears to be to use a custom format.</p>
  
  <p>Can my format</p>
  
  <pre><code>#,###,##0.0### 
  </code></pre>
  
  <p>be tweeked to work like Excel's General format for numbers?</p>
  
  <p><img src="https://i.stack.imgur.com/xwGTD.png" alt="enter image description here"></p>