copy paste is changing the cell value format.

A

Aruna Akella

I have endlish OS machine but changed my decimal seperator to "," in regional
settings.

My app is an addin to Excel - and a src cell has "1.5" as cell value - but
when I copy and paste it after initializing my app, then the destination cell
value is changed to "1,5" (but before initializing my app, native Excel
copy/paste shows correct format of destination cell value).

Below is the code that I do during copy/paste operation with in Excel from
my app.

string srcCellValue = "1.5"

// during my debug mode - I see correct format of excel destination cell
value
// at this point, but after I call set_Value() method, the destination cell
// value changes to "1,5".
destRange.set_Value(Excel1.XlRangeValueDataType.xlRangeValueDefault,
srcCellValue);

Any help is really appreciated. I did also try changing the numberdecimal
seperator to "." before calling set_value method - but this didn't help! (

Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = ".")

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top