Excel cell(1,2) has data with blank lines as:
"
vb is hard language.
test data.
test vb.
"
I want to change to without blank lines as "
"vb is hard language.
test data
test vb"
Below code is not working. Please please help.
----------
Set ExcelApp = createobject("Excel.Application")
ExcelApp.Visible = True
Dim FilePath
FilePath = "F:\afi\vbscript\Test.xls"
Set ExcFile = ExcelApp.Workbooks.Open (FilePath)
a = ExcelApp.Cells(1,2)
b = Replace(a , " " , "")
ExcelApp.Cells(1,2) = b