管理信息系统课程设计人事档案管理(12)

2021-01-20 14:58

Adodc1.Recordset.MoveNext Loop

Text3.Text = Val(sum) '保存到text1中去 Adodc1.Recordset.MoveFirst Adodc1.Refresh

Dim SaveFile As String

Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet

Adodc1.RecordSource = "select * from 员工基本信息表 where 员工编号 like '%" & Text2.Text & "%' and 姓名 like '%" & Text1.Text & "%'and 婚姻状况 like '%" & Combo1.Text & "%'and 性别 like '%" & Combo6.Text & "%' and 职位 like '%" & Combo2.Text & "%' and 政治面貌 like '%" & Combo3.Text & "%' and 所在部门 like '%" & Combo5.Text & "%'and 学历 like '%" & Combo4.Text & "%' " Adodc1.Refresh

Set xlApp = CreateObject("Excel.Application") '创建EXCEL对象

Set xlBook = xlApp.Workbooks.Add '打开已经存在的EXCEL工件簿文件

xlApp.Visible = True '设置EXCEL对象可见(或不可见) Set xlSheet = xlBook.Worksheets("Sheet1") '设置活动工作表 xlSheet.Cells(1, 1) = "员工编号" xlSheet.Cells(1, 2) = "姓名" xlSheet.Cells(1, 3) = "年龄" xlSheet.Cells(1, 4) = "性别" xlSheet.Cells(1, 5) = "所在部门" xlSheet.Cells(1, 6) = "电话" xlSheet.Cells(1, 7) = "职位" xlSheet.Cells(1, 8) = "学历" xlSheet.Cells(1, 9) = "聘用时间" xlSheet.Cells(1, 10) = "离职时间" xlSheet.Cells(1, 11) = "婚姻状况" xlSheet.Cells(1, 12) = "政治面貌" xlSheet.Cells(1, 13) = "毕业学校" xlSheet.Cells(1, 14) = "籍贯" xlSheet.Cells(1, 15) = "民族" For j = 1 To sum

xlSheet.Cells(j + 1, 1) = Adodc1.Recordset.Fields(0) xlSheet.Cells(j + 1, 2) = Adodc1.Recordset.Fields(1)


管理信息系统课程设计人事档案管理(12).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:增值税发票销售清单(模板)

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: