请问如何读写EXCEL表中的数据

onebody 2003-05-02 09:57:58
请问如何读写EXCEL表中的数据
...全文
32 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
所搜去!
好懒!^_^
onebody 2003-05-06
  • 打赏
  • 举报
回复
delphi 也要啊我也正在学啊
xiaoyuer0851 2003-05-05
  • 打赏
  • 举报
回复
呵呵,我来错了~~~

delphi中的读写我到可以帮你!~~~
vb正在学习,关注中!~~~
j4sxw 2003-05-05
  • 打赏
  • 举报
回复
Dim ExcelApp As Excel.Application
Dim ExcelBook As Excel.Workbook
Dim ExcelSheet As Excel.Worksheet
Set ExcelApp = CreateObject("excel.application") '创建EXCEL句柄
ExcelApp.Visible = False '
Set ExcelBook = ExcelApp.Workbooks.Add '创建EXCEL工作薄
Set ExcelSheet = ExcelBook.Worksheets(1) '创建EXCEL工作表
ExcelSheet.Cells(1, 1).Value = "编号"
ExcelSheet.Cells(1, 2).Value = "单位名称"
ExcelSheet.Cells(1, 3).Value = "负责人"
ExcelSheet.Cells(1, 4).Value = "单位地址"
ExcelSheet.Cells(1, 5).Value = "类别"
ExcelSheet.Cells(1, 6).Value = "许可项目"
ExcelSheet.Cells(1, 7).Value = "区域"
ExcelSheet.Cells(1, 8).Value = "乡镇"
ExcelSheet.Cells(1, 9).Value = "发证日期"
ExcelSheet.Cells(1, 10).Value = "截止日期"
ExcelSheet.Range("A2").CopyFromRecordset rs

ExcelBook.SaveAs strExcelPath + "临时卫生许可证报表"
ExcelApp.Visible = True
ilqtj 2003-05-05
  • 打赏
  • 举报
回复
Dim xlteachder As New Excel.Application
Dim xlBook As New Workbook
Dim xlSheet As New Worksheet
Set xlteachder = CreateObject("excel.application")
xlteachder.Visible = False/true 是否可见
Set xlBook = xlteachder.Workbooks.Open(地址)
Set xlSheet = xlBook.Worksheets(1)
xxxx=xlSheet.Cells(1,1)Value 就是第一行地一列的值


xlSheet.Cells(1,1)Value=xxxx 也可以赋值
xlBook.Save 改变以后一定要保存
xlteachder.Quit
xlteachder.Workbooks.Close '关闭进程

1,216

社区成员

发帖
与我相关
我的任务
社区描述
VB 数据库(包含打印,安装,报表)
社区管理员
  • 数据库(包含打印,安装,报表)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧