The following is one example I have writen:Public Function OpenExecelObject(strFileName As String) As Boolean
Dim strFilePath As String
OpenExecelObject = False strFilePath = GetFileName(".xls", False) If strFilePath = "" Then Exit Function FileCopy gsAppPathSystem & "\Template\" & strFileName, strFilePath
Set gobjExcel = Nothing Set gobjExcel = CreateObject("Excel.Sheet") Set gobjBook = gobjExcel.Application.Workbooks.Open(strFilePath) Set gobjSheet = gobjExcel.Application.Sheets(1) OpenExecelObject = TrueEnd Function
The following is one example I have writen:Public Function OpenExecelObject(strFileName As String) As Boolean
Dim strFilePath As String
OpenExecelObject = False
strFilePath = GetFileName(".xls", False)
If strFilePath = "" Then Exit Function FileCopy gsAppPathSystem & "\Template\" & strFileName, strFilePath
Set gobjExcel = Nothing
Set gobjExcel = CreateObject("Excel.Sheet")
Set gobjBook = gobjExcel.Application.Workbooks.Open(strFilePath)
Set gobjSheet = gobjExcel.Application.Sheets(1)
OpenExecelObject = TrueEnd Function
不过楼主好像是要数据库方法哦!
http://bbs.tencent.com/cgi-bin/bbs/bbs_show_content?from=t&groupid=102:10048&messageid=49619&club=3