ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Retain cell formatting? (https://www.excelbanter.com/excel-programming/381669-retain-cell-formatting.html)

dev

Retain cell formatting?
 
When we are setting the value of a cell we are losing formatting €“ is there
anyway we can retain the cell formatting

r.set_Value(Excel1.XlRangeValueDataType.xlRangeVal ueDefault, factValue); //
factValue is string

r.Cells.NumberFormat =
Thread.CurrentThread.CurrentCulture.NumberFormat.N umberDecimalSeparator ;


Is there anything else needs to be done ?


Thanks



All times are GMT +1. The time now is 08:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com