Hi,
I am working on exporting data from db to excel.
I need to make some changes in the data retrieved in the cells.
To be precise i need to replace some strings with other.
e.g. 'ABB' needs to be replaced by 'AB'in the generated excel
'MNODays' needs to be replaced by 'LM Days'
'MN' needs to be replaced with 'LM Hours'
usinf Replace function I have tried the following:
<pre>Excel.Range rg1;
rg1 = excelSheet.get_Range(B:B, Type.Missing);
rg1.Cells.Replace("MNODays","LM Days", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
rg1.Cells.Replace("MN","LM Hours", Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
The problem is that its exact match is not being taken and replaced. As in 'MNODays' gets replaced with 'LLM Days Hours' mixing it with the characters in second separate string 'MN'.
Is there any other way to achieve the exact match functionality?
Please help
Thanks