> > Hi,
> >
> >
> > I did following code for opening excel sheet from my foxpro programm(form button click).Its opening excel sheet but when I close it it shows me error that "OLE IDispatch exception code 0 from Microsoft Office Excel: 'icrosoft Excel.xlsx' could not be found.Check the spelling of the file name,and verify that the file location is correct"
> >
> > LOCAL lobject, lcFile,lobject1
> > lobject = CREATEOBJECT('Excel.Application')
> > lobject.Visible = .T.
> > lobject.Workbooks.Open(m.lobject)
> >
> > Can you tell me solution.
> >
> > Thanks,
> > vaishali maske
>
>
> Actually you are doing worng syntanx workbooks.open need a file name not excel object!.
> LOCAL lobject, lcFile,lobject1
> lobject = CREATEOBJECT('Excel.Application')
> lobject.Visible = .T.
> lobject.Workbooks.Open("c:\temp.xls")
>
>
> Anil
>
My BlogHi anil,
This new code also shows same problem.pls tell me any other solution.
Thanks,
vaishali maske