Iam trying to read a column in excel which is formatted to number type.When the regional and language settings in windows are in U.S silk is able to read the number correctly.But when the regional and language settings in windows are changed to Dutch or any non-U.S setting ,Silk is reading its U.S number equivalent.
For example 1,000.25 in excel in U.S setting will be interpreted as 1.000,25 in Excel if regional and language settings in windows are changed to Dutch.When silk reads 1.000,25 from Excel it reads it as 1,000.25
What happens if you convert the number to a string within the sql statement? e.g. something like:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">"select str(thenumbercolumn) from thetablename"</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">That might return you a consistent string which you can then parse (within silktest) into the actual number.
Anyways, we wrote a custom code to handle this scenario.We are using kernel32.dll and we wrote methods like FormatToLocalNumber(STRING sNum) and FormatToLocalShortDate (STRING sDate) which will read the regional settings from windows and formats the numbers and dates accordingly.