L
Lenonardo
I am writing an application that processes Excel spreadsheets.
I need this to work on the clients machine with Excel 2000.
I have Office XP Excel 2002 - Excel 10 object library.
If I add an Excel COM reference and use late binding to define my excel
application ( 'createobject("excel.application") can I cast this to
Excel.Application
e.g.
dim xlapp as Excel.application
xlapp=ctype(createobject("Excel.application"),Excel.application)
(which will be Excel 10.0 type) and then proceed as if everything is Excel
10.0 (although on the clients machine the underlying object will actually
be Excel 9.0)
e.g.
dim xl_wb as Excel.Workbook
xl_wb=xlapp.Workbooks.add
or do I need to do a CTYPE on every object created
xl_wb=ctype(xlapp.workbooks.add,excel.workbook)
or won't this work at all and I need to create each object as a pure Object
type as below?
dim xl_wb as object
xl_wb=xlapp.workbooks.add
Any advice appreciated.
I need this to work on the clients machine with Excel 2000.
I have Office XP Excel 2002 - Excel 10 object library.
If I add an Excel COM reference and use late binding to define my excel
application ( 'createobject("excel.application") can I cast this to
Excel.Application
e.g.
dim xlapp as Excel.application
xlapp=ctype(createobject("Excel.application"),Excel.application)
(which will be Excel 10.0 type) and then proceed as if everything is Excel
10.0 (although on the clients machine the underlying object will actually
be Excel 9.0)
e.g.
dim xl_wb as Excel.Workbook
xl_wb=xlapp.Workbooks.add
or do I need to do a CTYPE on every object created
xl_wb=ctype(xlapp.workbooks.add,excel.workbook)
or won't this work at all and I need to create each object as a pure Object
type as below?
dim xl_wb as object
xl_wb=xlapp.workbooks.add
Any advice appreciated.