title: vb.net export to excel change cell format
body: <p>I am currently needed to show data in a standard format in excel converted from a web application.</p>
  
  <p>Number format needed to be displayed: 
  999.00</p>
  
  <p>I use:</p>
  
  <pre><code> CDbl(number).ToString("#,##0.00") 
  </code></pre>
  
  <p>to display standard format in the web application.
  But when I convert it into excel, it displays:
  999 (due to cell format = General)</p>
  
  <p>Anything I can do to change the cell format to Number?</p>
  
  <p>I tried add a spacebar in between to display the 2 decimal points:</p>
  
  <pre><code>CDbl(number).ToString("#,##0. 00")
  </code></pre>
  
  <p>It displays: 999. 00 (but it also changed to string instead of number and aligned to left which is not a good display)</p>