12-07-2012, 01:52 AM
Code:
Set ExcelApp = createobject("Excel.Application")
ExcelApp.Visible = True
Dim FilePath
FilePath = "F:\afi\vbscript\Test.xls"
ExcelApp.Workbooks.Open (FilePath)
set newsheet=ExcelApp.Sheets.Item(1)
a = newsheet.Cells(1,2)
b = Replace(a , " " , "")
newsheet.Cells(1,2) = b
msgbox b
i dont if this works coz iam not able to create a excel with blank values..try this if not sorry