Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Excel changing text/general to number format

$
0
0

In a powershell script I can change the format on a Excel column from general/text to number, however, it stays formated as text until you go in through error check and correct it or pull up each cell and edit it.  Is there a way script out this.

I am trying to read the spreadsheet in a datatable and bulk copy it to a SQL table.  The spreadsheet has negitive numbers represented with () so the datatable fill bombs out on the first negitive number.  When they are changed and stored to numeric format the () changes to a - sign and the datatable has not problem.  Any help would be appreciated.  Thanks


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>