formula one常用函数
1.read
f1.object.Read("模板.vts", ref fh)// 把模板读入OLE控件
2.setactivecell
f1.object.setactivecell(21,2)//设置为活动
3.Entry
f1.object.Entry=string//把上面设置活动的单元填充string
4.f1.object.selection="A1:G38"
f1.object.setprotection(false,false)//将A1:G38的单元格置为可写,其余不可。f1.object.enableprotection=true
f1.object.selection="C4"//光标停在C4单元格处
5.f1.object.fileprint打印
6.ole_1.object.NumSheets = 2 //设置第二个sheet为当前活动的sheet
7.ole_1.object.maxRow //取最大行
8.ls_text = ole_1.object.TextRc[ll_row,2] //取ll_row行,2列的值
9.ole_2.object.write(ls_savepath,12)//写入ls_savepath文件中
10.ll_sheetsnum = gole_bb.numsheets //求得到f1 sheet的个数,最大不能超过255个。
11.gole_bb.insertsheets(integer li_1,integer li_2) //在li_1前面插入li_2个sheet,li_i必须大于0,1就代表了最前面,sheet总数不能超过255个。
12.gole_bb.setselection(1,1,gole_bb.maxrow,gole_bb.maxcol)//选择区域
13.gole_bb.ObjGetSelectionCount //?
14.ll_cursheet = gole_bb.sheet //当前索引的sheet号
15.ls_sheetname = gole_bb.sheetname[ll_cursheet]//ll_cursheet 索引号的sheet名字
16.gole_bb.Write('c:/preview.xls',11) //把当前的f1写入到 preview.xls中
17.gole_bb.printHeader=''//设置页眉为空
gole_bb.fileprintex(false,false)