文档详情

cellweb表格控件方法.doc

发布:2017-02-14约3.37万字共85页下载文档
文本预览下载声明
― ――――――行列区域设置―――――― SetCols(cols As Long, sheetindex As Long) 参数 cols 为列数。 sheetindex 为页号 注释 设置某页的列数。 ――――――――――――――――――――――――――――――――――――――― ClearArea(startcol As Long, startrow As Long, endcol As Long,endrow As Long,sheet As Long, option As Long) 参数 startcol 开始列 startrow 开始行 endcol 结束列 endrow 结束行 sheet 指定页 option option Description 1 文字 2 公式 4 超级连接 8 格式 16 图表 32 全部 注释 根据指定形式来清除指定区域中的内容。 SetRows(rows As Long, sheetindex As Long) 参数 rows 为行数 sheetindex 为页号 注释 设置某页的行数。 GetCols(sheetindex As Long) As Long 返回值 sheetindex 索引的工作表页的列数。 参数 sheetindex 工作表页号索引值,索引从 0 开始。 注释 如果使用此方法之前,本页还没有读入内存,请先调用 SetCurSheet 方法。 GetRows(sheetindex As Long) As Long 参数 sheetindex 为页号 注释 获得某页的总行数。如果使用此方法之前,本页还没有读入内存,请先调用SetCurSheet方法。 InsertCol(startcol As Long, count As Long, sheetindex As Long) 参数 startcol 要插入的起始位置; count 要插入的总数; sheetindex 页号。 注意 每张表页最多可以有255列。在startcol等于表页总列数时使用该方法,相当于追加列。 例如: Dim TotalCols As Long TotalCols = Cell.GetCols( 0 ) Cell.InsertCol TotalCols, 4, 0 在第一张表页的最后追加4列。 注释 插入列。 DeleteCol(startcol As Long, count As Long, sheetindex As Long) 参数 startcol 要删除的起始位置 count 要删除的总数 sheetindex 页号 注释 根据输入的参数确定删除指定列的起始位置、所要删除的总数以及指定列所在的页号来删除指定列。 InsertRow(startrow As Long, count As Long, sheetindex As Long) 参数 startrow 要插入的起始位置 count 要插入的总数 sheetindex 页号 注意 每张表页最多可以有65535行。在 startrow 等于表页总行数时使用该方法,相当于追加行。 例如: Dim TotalRows As Long TotalRows = Cell.GetRows( 0 ) Cell.InsertRow TotalRows, 4, 0 在第一张表页的最后追加4行。 注释 插入行。 DeleteRow(startrow As Long, count As Long, sheetindex As Long) 参数 startrow 要删除的起始位置 count 要删除的总数 sheetindex 页号 注释 删除指定的行。 GetCurrentCol() As Long 返回值 当前单元格的列号。 注释 获得当前单元格的列号,单元格的坐标是从1开始的,即:A1单元格的坐标是(1,1)。 GetCurrentRow() As Long 返回值 当前单元格的行号。 注释 获得当前单元格的行号,单元格的坐标是从1开始的,即:A1单元格的坐标是(1,1)。 GetColWidth (type As Long, col As Long, sheet As Long) As Long 参数 type 显示单位0表示逻辑值(1个逻辑单位为1/10mm)1表示屏幕像素值 col 列号 sheet 页号 注释 得到指定列的列宽。 GetColBestWidth (col As Long) As Long 参数 col 列号 注释 得到指定列最适合的列宽(像素值)。 GetRowHeight(type As Long, row As
显示全部
相似文档