stripping inverted commons out of a word
hi
i read text in an excel file as follows
Code:
oRng = oWSSheet.Cells.Find("UNREALIZED LOSS - FVTPL_HFT_SEC (LONG) (59612102)", , _
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart, _
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, False)
' MsgBox("Value '" & oRng.Value & "' found at '" & oRng.Address)
Me.unrealse = oRng.Offset(0, 5).Valu
so in the above example it looks for the words UNREALIZED LOSS - FVTPL_HFT_SEC (LONG) (59612102)
but in one of the excel files the words are like this "UNREALIZED LOSS - FVTPL_HFT_SEC (LONG) (59612102)"
when i try to do the code as usual like the above code i get an error is there something i can put in my code to strip out the "" around the words
Re: stripping inverted commons out of a word
That would be "inverted commas", and you can do it like so:
Code:
myString = myString.Replace(ControlChars.Quote, String.Empty)