title: Numbers not keeping format when exported from SSRS 2008 R2 to Excel 2010
body: <p>I am using an expression to display currency depending on if the value is in the millions or in the thousands. This expression is set in the Format property of my report: </p>
  
  <pre><code>=iif((Fields!PrevActual.Value &lt; 100000), "'$'#,,0,'K';('$'#,0,'K')", "'$'0,,.0,'M';('$'0,,.0,'M')'")
  </code></pre>
  
  <p>In this way, if the value is 1,500,000 the number will display as $1.5M and if it's 15,000 it will display as $15k. </p>
  
  <p>The problem is when I export the file to Excel. The numbers in the thousands retain the formatting, but the numbers in the millions lose it. So I have a spreadsheet with numbers like 1,500,000 and $15k.  All numbers are exporting as text. </p>
  
  <p>Does anyone know of a way to keep the formatting in excel so it matches how it's displayed on the SSRS report while making sure it's also still a number? </p>
  
  <p>Essentially, I want to mimic what excel was doing before we automated this report with SSRS. Numbers in the millions were in this custom number format: $#.0,,\M and thousands were in this one: $#,K. </p>
  
  <p>Thanks!</p>