Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
delete blank lines in excel cell
#1
Not Solved
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.

----------
Code:
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
Reply


Messages In This Thread
delete blank lines in excel cell - by QAVA - 12-06-2012, 01:02 AM
RE: delete blank lines in excel cell - by diya - 12-07-2012, 01:52 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Delete Firefox history and Cookies Anupama 0 1,326 06-18-2018, 11:57 AM
Last Post: Anupama
  How import final calculated values by cell formula from Excel not the formula itself. qtped 1 4,719 01-17-2017, 04:05 PM
Last Post: sagar.raythatha
  Need to Validate Text filed is blank after clicking on the Text box balak89 3 4,549 09-13-2015, 12:06 AM
Last Post: ADITI1992
  How to delete particular mails in Gmail using QTP rajkumarsm 1 3,870 10-06-2014, 07:03 PM
Last Post: rajkumarsm
  How to delete the cookies (1000 records) akhandesh 1 2,511 09-03-2014, 09:57 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 2 Guest(s)