您的位置:程序门 -> vb -> 非技术类



发布一款免费的grid控件


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


发布一款免费的grid控件[已结贴,结贴人:yrb]
发表于:2007-03-22 18:01:27 楼主
yfgrid控件说明:
本grid控件支持多sheet、单元格合并、行列冻结、页面设置、打印(预览)等常规grid操作,grid内容保存为xml格式文件,采用ole的方式导出excel文件。目前没有表达式求值和图表功能,计划下一个版加入表达式求值。本grid可以用于c/s或b/s程序的数据录入和报表打印部分,如果开发b/s程序,可以非常方便的使用ajax技术进行报表填写、数据传送。
本grid控件可以免费使用,不过免费版本在页眉上打印尚未注册字样。
本控件使用vc++开发,尚完善中,欢迎各位提出宝贵建议。
下面是控件支持的方法和事件,更详细的信息稍后提供。
控件下载地址:
http://www.yfsoft.cn/soft/yfgrid.rar
1、本控件支持的方法:
sub   getcursheet(cursheet   as   integer)

sub   getselectrange(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long)

sub   getfocuscell(sheet   as   integer,   col   as   long,   row   as   long)

sub   setbgcolor(heet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   bgcolor   as   ole_color)

sub   setfgcolor(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   fgcolor   as   ole_color)

sub   setborderall(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setborderleft(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setbordertop(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setborderrightsetborderright(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setborderbottom(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setinsideall(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setinsidevertical(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)

sub   setinsidehorizontal(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   width   as   integer)
sub   setfontname(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   fontname   as   string)

sub   setfontbold(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   bold   as   integer)

sub   setfontitalic(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   italic   as   integer)

sub   setfontunderline(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   underline   as   integer)

sub   setfontsize(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   size   as   integer)

sub   sethorzalign(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   align   as   integer)

sub   setvertalign(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   align   as   integer)

sub   mergecell(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long)

sub   unmergecell(sheet   as   integer,   col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long)

sub   insertcol(sheet   as   integer,   col   as   long,   colcount   as   long)

sub   insertrow(sheet   as   integer,   row   as   long,   rowcount   as   long)

sub   deletecol(sheet   as   integer,   col   as   long,   colcount   as   long)

sub   deleterow(sheet   as   integer,   row   as   long,   rowcount   as   long)

sub   appendsheet(sheetname   as   string,   colcount   as   long,   rowcount   as   long)

sub   deletesheet(sheet   as   integer)

sub   setfixedcolrow(sheet   as   integer,   col   as   long,   row   as   long)

sub   savetoxmlfile(xmlfile   as   string)   as   boolean

function   savetoxmldom(punknown   as   unknown)   as   boolean  
function   savetoxlsfile(xlsfile   as   string)   as   boolean

function   loadfromxmlfile(xmlfile   as   string)   as   boolean

function   loadfromxmldom(punknown   as   unknown)   as   boolean

sub   setcelltext(sheet   as   integer,   col   as   long,   row   as   long,   celltext   as   string)

sub   getcelltext(sheet   as   integer,   col   as   long,   row   as   long,   celltext   as   string)

sub   getrowcount(sheet   as   integer,   rowcount   as   long)

sub   getcolcount(sheet   as   integer,   colcount   as   long)

sub   deleteallsheet()

sub   setrowflag(sheet   as   integer,   row   as   long,   flag   as   long)

sub   getrowflag(sheet   as   integer,   row   as   long,   flag   as   long)

sub   getsheetindexbysheetname(name   as   string,   index   as   integer)

sub   getsheetnamebysheetindex(index   as   integer,   name   as   string)

sub   setprtpara(sheet   as   integer)

sub   print(sheet   as   integer)

sub   printpreview(sheet   as   integer)

2、控件支持的事件
event   selectionchange(col1   as   long,   row1   as   long,   col2   as   long,   row2   as   long,   sheet   as   integer)

event   sheetchange(sheet   as   integer)

event   gotfocus()

event   lostfocus()

发表于:2007-03-22 18:04:381楼 得分:20
jf
发表于:2007-03-22 18:11:502楼 得分:20
支持!!!
发表于:2007-03-22 19:02:433楼 得分:20
友情up
发表于:2007-03-22 20:09:164楼 得分:40
up
发表于:2007-03-23 08:32:225楼 得分:0
up
发表于:2007-03-23 09:15:386楼 得分:0
技术支持qq:173586687,标注“grid控件”
发表于:2007-03-23 09:59:257楼 得分:0
yfgrid导出的xml文件:
  <?xml   version= "1.0 "   ?>  
-   <yfgrid   defrowheight= "18 "   defcolwidth= "80 ">
-   <sheetlist>
-   <sheet   name= "sheet1 "   colcount= "4 "   rowcount= "10 "   fixedcolcount= "0 "   fixedrowcount= "0 ">
-   <stylelist>
-   <style   index= "0 ">
    <font   />  
    <align   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "1 ">
    <font   />  
    <align   vert= "0 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "2 ">
    <font   />  
    <align   vert= "1 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "3 ">
    <font   />  
    <align   horz= "1 "   vert= "0 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "4 ">
    <font   />  
    <align   horz= "1 "   vert= "1 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "5 ">
    <font   />  
    <align   horz= "1 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "6 ">
    <font   />  
    <align   horz= "2 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "7 ">
    <font   />  
    <align   horz= "2 "   vert= "0 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "8 ">
    <font   />  
    <align   horz= "2 "   vert= "1 "   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   />  
    </style>
-   <style   index= "9 ">
    <font   />  
    <align   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   background= "4227327 "   />  
    </style>
-   <style   index= "10 ">
    <font   />  
    <align   />  
    <border   left= "1 "   top= "1 "   right= "1 "   bottom= "1 "   />  
    <color   foreground= "255 "   />  
    </style>
    </stylelist>
-   <celllist>
    <cell   col= "0 "   row= "0 "   styleindex= "0 "   celltype= "0 "> 对齐方式 </cell>  
    <cell   col= "0 "   row= "1 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "0 "   row= "2 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "0 "   row= "3 "   styleindex= "0 "   celltype= "0 "> 背景色 </cell>  
    <cell   col= "0 "   row= "4 "   styleindex= "0 "   celltype= "0 "> 文字色 </cell>  
    <cell   col= "0 "   row= "5 "   styleindex= "0 "   celltype= "0 "> 合并单元格 </cell>  
    <cell   col= "0 "   row= "6 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "0 "   row= "7 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "0 "   row= "8 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "0 "   row= "9 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "0 "   styleindex= "1 "   celltype= "0 "> 左上 </cell>  
    <cell   col= "1 "   row= "1 "   styleindex= "3 "   celltype= "0 "> 中上 </cell>  
    <cell   col= "1 "   row= "2 "   styleindex= "7 "   celltype= "0 "> 右上 </cell>  
    <cell   col= "1 "   row= "3 "   styleindex= "9 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "4 "   styleindex= "10 "   celltype= "0 "> yfgrid </cell>  
    <cell   col= "1 "   row= "5 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "6 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "7 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "8 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "1 "   row= "9 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "0 "   styleindex= "2 "   celltype= "0 "> 左中 </cell>  
    <cell   col= "2 "   row= "1 "   styleindex= "4 "   celltype= "0 "> 中中 </cell>  
    <cell   col= "2 "   row= "2 "   styleindex= "8 "   celltype= "0 "> 右中 </cell>  
    <cell   col= "2 "   row= "3 "   styleindex= "9 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "4 "   styleindex= "10 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "5 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "6 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "7 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "8 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "2 "   row= "9 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "0 "   styleindex= "0 "   celltype= "0 "> 左下 </cell>  
    <cell   col= "3 "   row= "1 "   styleindex= "5 "   celltype= "0 "> 中下 </cell>  
    <cell   col= "3 "   row= "2 "   styleindex= "6 "   celltype= "0 "> 右下 </cell>  
    <cell   col= "3 "   row= "3 "   styleindex= "9 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "4 "   styleindex= "10 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "5 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "6 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "7 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "8 "   styleindex= "0 "   celltype= "0 "   />  
    <cell   col= "3 "   row= "9 "   styleindex= "0 "   celltype= "0 "   />  
    </celllist>
    <selectrange   col1= "0 "   row1= "9 "   col2= "0 "   row2= "9 "   />  
    <focuscell   col= "0 "   row= "10 "   />  
-   <mergecelllist>
    <mergecell   col1= "1 "   row1= "5 "   col2= "3 "   row2= "9 "   />  
    </mergecelllist>
    <colwidthlist   />  
-   <rowheightlist>
    <rowheight   row= "0 "   height= "33 "   />  
    <rowheight   row= "1 "   height= "33 "   />  
    <rowheight   row= "2 "   height= "33 "   />  
    </rowheightlist>
    </sheet>
    </sheetlist>
    </yfgrid>


快速检索

最新资讯
热门点击