title: VBA Querytables converting text to number in Excel
body: <p>I have a simple VBA code that fetches stock prices from google finance. When I get the results back in the column, excel is converting rows into numbers. These are comma separated values that look like 189,209.97,210.03,209.97,210,300 and it works fine (stays as text). But once in a while the value is 190,210,210,210,210,000 in which case excel turns it into a number (no more commas), which messes up my downstream processing because I need to convert text to columns. Any way to force excel through VBA to accept all values as text only? Here's what the code looks like:</p>
  
  <pre><code>With DataSheet.QueryTables.Add(Connection:="URL;" &amp; qurl, Destination:=DataSheet.Range("a1"))
          .BackgroundQuery = True
          .TablesOnlyFromHTML = False
          .Refresh BackgroundQuery:=False
          .SaveData = True
  End With
  </code></pre>