关于PB的一段代码问题!
各位高手,本人有以下一段代码有不明的地方
long numcols , numrows , c, r
OLEObject xlapp , xlsub
int ret
string ls_pathfile,ls_file
integer li_retval
string ls_colname
li_retval = getfilesavename("select file",ls_pathfile,ls_file, &
"xls","Excel Files (*.xls),*.xls")
if li_retval = 1 then
dw_print.saveas(ls_pathfile,excel5!,true)
numcols = long(dw_print.Object.DataWindow.Column.Count)
numrows = dw_print.RowCount()
xlApp = Create OLEObject
ret = xlApp.ConnectToNewObject( "Excel.Sheet" )
if ret < 0 then
MessageBox("Connect to Excel Failed !",'不能找到Excel!')
return
end if
xlApp.Application.Workbooks.Open(ls_pathfile) //,false,true
xlApp.Application.Visible = true
xlsub = xlapp.Application.ActiveWorkbook.Worksheets[1]
有谁能帮我解释一下以下三句的意思啊?
xlApp.Application.Workbooks.Open(ls_pathfile) //,false,true
xlApp.Application.Visible = true
xlsub = xlapp.Application.ActiveWorkbook.Worksheets[1]
谢谢各位!