title: Changing decimal separator in Excel using a macro
body: <p>I am using a simple java program that outputs data into several comma separated text files. I import these files to Excel using a macro pasting each file into separate sheets named after file name. The problem is that the output decimal separator is point "." and the regional setting is comma ",". I don't want to keep changing the regional settings all the time.</p>
  
  <p>Using Ctrl+F and replacing all points with commas works fine. But if I record this as a macro and run it the data is displayed incorrectly and I get "number stored as text" errors (like this <a href="https://stackoverflow.com/questions/10075968/using-the-replace-method-in-vba-leaves-numbers-stored-as-strings">example</a>). I have been looking at two possible solutions for this:</p>
  
  <ol>
  <li><p>Using a replace function like <a href="https://stackoverflow.com/questions/13710548/how-to-fix-dot-as-the-decimal-separator-in-excel">here</a>. But I have trouble getting it to run as I don't understand what some of the lines do and what I need to change.</p></li>
  <li><p>Changing the comma separator settings in Excel like <a href="https://stackoverflow.com/questions/21252436/how-to-change-decimal-separator-with-macro">here</a>. This solution would require these settings to reset on exit. Doing it this way does not really solve the problem but goes around it.</p></li>
  </ol>
  
  <p>Example output <a href="http://s000.tinyupload.com/?file_id=02417694133455788952" rel="nofollow">here</a>. Thank you very much for any input!</p>