Thanks for your help rorya.
Instead of changing the culture of the entire thread I have changed the culture for the single property set using reflection.
//use reflection to invoke the number format property. because we need en-US culture inorder to work on other cultures.
//if we set the NumberFormat from US Culture then excel will automatically changes it to the culture it running.
rangeType.InvokeMember("Nu
, null, singleCell.EntireColumn, new object[] { format }, Common.Tools.en_US_Culture
.
Main Topics
Browse All Topics





by: roryaPosted on 2009-01-20 at 00:10:52ID: 23418037
Your problem I believe is that .Net passes the system lcid to the Excel object model, so both Numberformat and Numberformatlocal end up acting like NumberFormatLocal. You need to add something like the following before working with Excel (taken from PED)
Select allOpen in new window