全文预览已结束
下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
fpvaspread 详解详解 With vaspread DeleteRows 1 1 删除第一列第一行数据 Col 1 Row 1 Lock False 设置 vaspread 为解锁状态 AllowUserFormulas False 不允许格式化 MaxCols 67 58 设置最大列数 MaxRows 300 设置显示行的最大数 ColHeaderRows 1 2 将头换成 1 行 UserColAction UserColActionSort 表头是否排序 AddCellSpan 1 SpreadHeader 17 1 16 change 17 设置显示标题栏格式 Col 1 Row SpreadHeader Text 基本信息 设置列名 Col COL ID Row SpreadHeader Text 序号 SpreadHeader 1 控制显示 的行 SpreadHeader 1 DateField 为绑定的数据表字段 colhidden 是否为隐藏 Colwidth 设置显示的列的宽度 Col COL FID Row SpreadHeader DataField FID Text 表体唯一号 ColHidden True ColWidth 1 12 SpreadHeader 1 格式化列表 CellType CellTypeDate 日期 Col FhwBoolIn 2 FStartDate CellType CellTypeDate TypeDateFormat TypeDateFormatYYMMDD 设置数字 CellType CellTypeNumber Col FhwBoolIn 2 FThickness CellType CellTypeNumber TypeNumberDecPlaces 2 TypeNumberShowSep True TypeHAlign TypeHAlignRight 设置文本型 CellType CellTypeEdit Col FhwBoolIn 2 FDescriptionCust TypeEditMultiLine True CellType CellTypeEdit AutoSize True 自动换行换列 Private Sub EntrerCtrlCol ByVal KeyCode As Long Enter 换行 With vaspread If KeyCode 13 Then 获取回车事件 If MaxCols ActiveCol Then 如果当前列不等于最大列 则换行否则换列 SetActiveCell ActiveCol 1 ActiveRow SetFocus Else SetActiveCell 1 ActiveRow 1 SetFocus End If End If End With End Sub 获取值 Dim pvalue as variant vaspread GetText vaspread ActiveCol vaspread ActiveRow pvalue pvalue 为获取的值 vaspread SetText vaspread ActiveCol vaspread ActiveRow pvalue pvalue 需要给赋予的值 设置行底色一级边框颜色 第一行设置背景颜色 第二行设置边框颜色 With vasperad Col 1 Row Row BackColor HC0C0C0 BackColorStyle BackColorStyleUnderGrid Col 1 Row Row BorderStyle BorderStyleFixedSingle BackColor H80000018 End with 复制行 With vaspread InsertRows vaspread ActiveRow 1 1 For i 0 To MaxCols Col i GetText i ActiveRow Temp If i FhwBoolIn 2 FDescriptionYard Or i FhwBoolIn 2 FDescriptionCust Then Temp Temp SetText i ActiveRow 1 Temp vaspread ColWidth FhwBoolIn 2 FDescriptionCust 20 vaspread ColWidth FhwBoolIn 2 FDescriptionYard 20 iHeight Len Temp 13 If Right FormatNumber iHeight 1 5 Then iHeightTemp Round iHeight 0 Else iHeightTemp Round iHeight 0 1 End If vaspread RowHeight ActiveRow 1 iHeightTemp 12 Else SetText i ActiveRow 1 Temp End If Next i End With 插入行 删除行 With vaspread If i 1 Then InsertRows ActiveRow 1 1 ElseIf i 2 Then GetText COL FID ActiveRow fid DeleteRows ActiveRow 1 If fid Then DateMoving fid End If End If End With 1 设置滚动条 有时候需要设置滚动条不可见就可以通过这里进行设置 设置序号 15 修改数据 这儿需要定义两个全局变量 Dim dctFront as KFO Dictionary Dim vctFront as KFO Vector If fid Then Set dctFront New KFO Dictionary dctFront fid fid dctFront filename GetFieldName vaspread ActiveCol If ActiveCol FhwBoolIn 2 FWhetherAssessment Or ActiveCol FhwBoolIn 2 FBusinessConfirmState Or ActiveRow FhwBoolIn 2 FSettlementState Or ActiveCol FhwBoolIn 2 FSignTheBillState Then If Trim Temp 是 Then dctFront value 1 ElseIf Trim Temp Or Trim Temp 是 Then dctFront value 0 End If Else dctFront value Temp End If vctFront Add dctFront Set dctFront Nothing 定义需要拿到的字段名称 Private Function GetFieldName ByVal i As Integer As String If i SpreadCol COL ID Then GetFieldName Fid ElseIf i SpreadCol FhwBoolIn 2 FMaterialsType FIndex Then GetFieldName FIndex ElseIf i FhwBoolIn 2 FSubcontractorName Then GetFieldName FSubcontractorName endif End sub I 为需要修改的列数 16 进行修改数据 Set dctFront New KFO Dictionary If vctFront UBound 0 Then For i vctFront LBound To vctFront UBound Set dctFront vctFront Item i If dctFront filename Then Ssql update t quota entry table set Ssql Ssql vbCrLf dctFront filename Replace dctFront value Ssql Ssql vbCrLf where fid dctFront fid Set obill CreateObject BillDataAccess GetData obill ExecuteSQL DEMMTS PropsString Ssql ModifyFlag True End If Next i Set dctFront Nothing Set vctFron
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 广东清远市代建项目管理局招考工程造价管理人员易考易错模拟试题(共500题)试卷后附参考答案
- 校车接送运营协议书
- 广东中烟工业限责任公司2025年下半年度公开招聘员工171人易考易错模拟试题(共500题)试卷后附参考答案
- 山西大同市平城区医疗集团招聘119人易考易错模拟试题(共500题)试卷后附参考答案
- 冒名申请住房协议书
- 出租婚庆房屋协议书
- 宁波市江东区事业单位登记管理局招考编制外用工易考易错模拟试题(共500题)试卷后附参考答案
- 核酸委托检测协议书
- 格力股权激励协议书
- 桉树合同转让协议书
- 离婚委托律师合同范本
- 2025 年事业单位招聘考试新闻类专业能力测 试试卷(新闻类)新闻评论写作与技巧
- 大学职业生涯规划课
- 2025黑龙江省交通投资集团有限公司招聘348人笔试历年备考题库附带答案详解2套试卷
- 《数控铣削编程与加工》试卷及答案
- 设备管理部经理竞聘
- 以能为本-2025年互联网职场新人流动趋势报告-脉脉高聘人才智库
- (2025年)事业单位招聘会计笔试题及答案
- 体检中心护理管理
- 2025年大学《新能源科学与工程-地热能利用技术》考试备考试题及答案解析
- 模拟日语教师招聘面试的流程与准备要点
评论
0/150
提交评论