将Grid存为文本文档
来源:互联网 发布:al是什么软件 编辑:程序博客网 时间:2024/05/17 07:55
'保存表格数据'函数:SaveFile'参数:MsgObj Mshfelxgrid控件名,FileName 加载的文件名'返回值:=True 成功.=True 失败.Public Function SaveFile(MsgObj As Control, FileName As String) As Boolean'/保存文件 Dim FileID As Long, ConTents As String Dim A As Long, B As Long Dim RowMax As Long, ColMax As Long Dim FixRows As Long, FixCols As Long Dim OleRow As Long, OleCol As Long Dim SFmtStr As String Dim strColWidth As String On Error Resume Next With MsgObj .Redraw = False FixRows = .FixedRows: FixCols = .FixedCols RowMax = .Rows - 1: ColMax = .Cols - 1 .FixedRows = 0: .FixedCols = 0 FileID = FreeFile Open FileName For Output As #FileID ConTents = RowMax + 1 & "|" & ColMax + 1 & "|" & FixRows & "|" & FixCols & "|" Print #FileID, ConTents '保存总的行数和列数. For A = 0 To .ColMax strColWidth = strColWidth & .ColWidth(A) & "|" Next Print #FileID, Left$(strColWidth, Len(strColWidth) - 1) '保存各列的宽度. For A = 0 To RowMax .Row = A: .Col = 0 .RowSel = A: .ColSel = ColMax ConTents = .Clip Print #FileID, ConTents Next A Close #FileID .FixedRows = FixRows: .FixedCols = FixCols .Redraw = True End With SaveFile = (Err.Number = 0) Err.ClearEnd Function
0 0
- 将Grid存为文本文档
- 将豆瓣电影top250排名在文本文档中保存
- 将文本保存为TXT文档
- WPS将网上下载的文本文档数据转换为WPS表格文档形式
- 将JPanel存为图片
- 将布局存为图像
- 为文本文档 设置 快捷键
- 将txt文本格式存储的词id表示的数据集存为matlab中的sparse格式
- 使用XSL将XML文档中的CDATA注释输出为HTML文本
- 利用Microsoft Office Document Imaging将图片文字转换为文本文档
- 如何将man与info文档转换为文本方式+info阅读
- 如何将右键新建文本文档默认编码设为UTF-8格式
- 文本挖掘--将分词之后的文档转化为结构化的数据
- poi操作word文档,以07版本为参考,将word文档中图片替换为文本(替换文本也一样),读图片可选文字内容
- 将文本转换为数组。
- Android 将View内容存为Bitmap
- C# 将数据存为二进制数据文件
- 如何在一个文本文档中保存目录信息
- CentOS6.8 安装Ganglia监控系统
- 前端html网站的发布过程
- 开启博客之旅
- 平时遇到的问题总结
- 每日论文Transient Attributes for High-Level Understanding and Editing of Outdoor Scenes
- 将Grid存为文本文档
- iOS仿支付宝账单饼状图
- plsql的配置ip文件tnsnames.ora
- egret导出html5项目与Thinkphp结合
- Android File 转Inputstram,跳转手机sdcard 获取指定文件
- 【SAP HANA】新建表以及操作数据(3)
- js数值为引用类型(object), 传递参数(参数为object)按引用传递,并非书中按值传递
- 数据结构实验之链表七:单链表中重复元素的删除
- Android Binder连接池