当前位置:网站首页>Range.CopyFromRecordset 方法 (Excel)
Range.CopyFromRecordset 方法 (Excel)
2022-07-30 18:50:00 【OOQ】
将 ADO 或 DAO Recordset 对象的内容复制到工作表中(从指定区域的左上角开始)。 如果 Recordset 对象包含具有 OLE 对象的字段,则该方法无效。
语法
expression.CopyFromRecordset (Data, MaxRows, MaxColumns)
expression 一个表示 Range 对象的变量。
名称 | 必需/可选 | 数据类型 | 说明 |
---|---|---|---|
Data | 必需 | Variant | 复制到范围中的 Recordset 对象。 |
MaxRows | 可选 | Variant | 复制到工作表中的记录数上限。 如果此参数被省略,便会复制 Recordset 对象中的所有记录。 |
MaxColumns | 可选 | Variant | 复制到工作表中的字段数上限。 如果此参数被省略,便会复制 Recordset 对象中的所有字段。 |
For iCols = 0 to rs.Fields.Count - 1
ws.Cells(1, iCols + 1).Value = rs.Fields(iCols).Name
Next
ws.Range(ws.Cells(1, 1), _
ws.Cells(1, rs.Fields.Count)).Font.Bold = True
ws.Range("A2").CopyFromRecordset rs
边栏推荐
- The large-scale application of artificial intelligence AI products in industrial-grade mature shipping ports of CIMC World Lianda will create a new generation of high-efficiency smart ports and innova
- Deepen school-enterprise cooperation and build an "overpass" for the growth of technical and skilled talents
- 积性函数
- 设计消息队列存储消息数据的 MySQL 表格
- The sixteenth issue of eight-part article Balabala said (MQ)
- What is the value of biomedical papers? How to translate the papers into Chinese and English?
- ByteArrayInputStream class source code analysis
- 好未来单季营收2.24亿美元:同比降84% 张邦鑫持股26.3%
- DTSE Tech Talk丨第2期:1小时深度解读SaaS应用系统设计
- nlohmann json 使用指南【visual studio 2022】
猜你喜欢
Mysql execution principle analysis
MySQL data types
生物医学论文有何价值 论文中译英怎样翻译效果好
延时队列优化 (2)
Critical Reviews | 南农邹建文组综述全球农田土壤抗生素与耐药基因分布
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.解决方法
CIMC Shilian Dafeitong is the global industrial artificial intelligence AI leader, the world's top AI core technology, high generalization, high robustness, sparse sample continuous learning, industri
nlohmann json 使用指南【visual studio 2022】
MySql中@符号的使用
C# wpf 无边框窗口添加阴影效果
随机推荐
怎么样的框架对于开发者是友好的?
CCNA-NAT协议(理论与实验练习)
OneFlow source code analysis: Op, Kernel and interpreter
Hello, my new name is "Bronze Lock/Tongsuo"
Pytorch foundation -- tensorboard use (1)
Go 系统收集
The use of @ symbol in MySql
【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest
CCNA-ACL(访问控制列表)标准ACL 扩展ACL 命名ACL
Multiple instances of mysql
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.解决方法
node封装一个控制台进度条插件
scrapy基本使用
使用postman调接口报Content type ‘text/plain;charset=UTF-8‘ not supported
《自然语言处理实战入门》---- 文本样本扩展小技巧:使用回译技术进行样本增强
线性筛求积性函数
固定资产可视化智能管理系统
natural language processing nltk
OneFlow源码解析:Op、Kernel与解释器
cocos creater 热更重启导致崩溃