I am trying to write to an Excel 2003 spreadsheet using c# 3.5. However I am unable to get this to function correctly across different country settings. The country settings
I haven't run your code, just scanned it...
First potential Problem: You are checking UseSystemSeparators and then setting the DecimalSeparaor and ThousandsSeparator.
if (app.UseSystemSeparators == false)
{
app.DecimalSeparator = ci.NumberFormat.NumberDecimalSeparator;
app.ThousandsSeparator = ci.NumberFormat.NumberGroupSeparator;
}
Then right after, you are turning on SystemSeparators, so the code above is not doing anything since you are turning the system seperators on.
app.UseSystemSeparators = true;
Second potential problem/suggestion: When setting the cell value, set it as a double value instead of string, let Excel format the number for you.