有没有或者,让PB用excel表作为后台数据库
2016-02-14 · 知道合伙人软件行家
关注
展开全部
在 ODBC 源处定义一个excel数据源就可以了
is_tran = Create gs_tran
is_tran.DBMS = "OLE DB "
is_tran.AutoCommit = False
is_tran.DBParm = "PROVIDER= 'Microsoft.ACE.OLEDB.12.0',DATASOURCE= '" + is_filename + "',PROVIDERSTRING= 'Excel 12.0';HDR=YES;IMEX=1;MAXSCANROWS=1280;"
Connect Using is_tran;
ls_sheetname = dw_sheet.GetItemString(1,'value')
ls_sql = 'select * from ['+ls_sheetname+'$]'
ls_syntax = is_tran.SyntaxFromSQL(ls_sql,'',ls_error)
ids_import.create(ls_syntax)
ids_import.SetTrans(is_tran)
ll_row = ids_import.Retrieve( )
is_tran = Create gs_tran
is_tran.DBMS = "OLE DB "
is_tran.AutoCommit = False
is_tran.DBParm = "PROVIDER= 'Microsoft.ACE.OLEDB.12.0',DATASOURCE= '" + is_filename + "',PROVIDERSTRING= 'Excel 12.0';HDR=YES;IMEX=1;MAXSCANROWS=1280;"
Connect Using is_tran;
ls_sheetname = dw_sheet.GetItemString(1,'value')
ls_sql = 'select * from ['+ls_sheetname+'$]'
ls_syntax = is_tran.SyntaxFromSQL(ls_sql,'',ls_error)
ids_import.create(ls_syntax)
ids_import.SetTrans(is_tran)
ll_row = ids_import.Retrieve( )
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询