View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
born2achieve born2achieve is offline
external usenet poster
 
Posts: 15
Default read datas from XML to excel using VBAmacros


DEar Friend,
i have tried this, but i cooldnot do this please help me to do this please
code:

Dim eMessage As String
Dim xlApp As Excel.Application

'AppActivate("Microsoft Excel")
'xlApp = GetObject(, "Excel.Application")
xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.OpenXML("C:\sample .xml")

ChDir("C:\")
xlApp.AlertBeforeOverwriting = False
xlApp.DisplayAlerts = False
xlApp.ActiveWorkbook.SaveAs(Filename:="C:\sample .xls")
xlApp.AlertBeforeOverwriting = True
xlApp.DisplayAlerts = True

If Not xlApp Is Nothing Then
xlApp.Quit()
xlApp = Nothing

End If