发布一款免费的GRID控件

yrb 2007-03-22 05:58:08
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()

...全文
328 19 打赏 收藏 转发到动态 举报
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
yrb 2007-03-28
  • 打赏
  • 举报
回复
to:jxufeng(玉龙猪)
慢慢来吧,再说了微软新版office也要使用xml格式了
jxufeng 2007-03-27
  • 打赏
  • 举报
回复
一看就知道免费测试,你的导出Excel最好别用OLE,自己写xls文件格式才好。
yrb 2007-03-27
  • 打赏
  • 举报
回复
u...p...
yrb 2007-03-24
  • 打赏
  • 举报
回复
up
yrb 2007-03-23
  • 打赏
  • 举报
回复
up
思危 2007-03-23
  • 打赏
  • 举报
回复
jf
dazedase 2007-03-23
  • 打赏
  • 举报
回复
djf
yrb 2007-03-23
  • 打赏
  • 举报
回复
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>
yrb 2007-03-23
  • 打赏
  • 举报
回复
技术支持qq:173586687,标注“grid控件”
wlwlxj 2007-03-23
  • 打赏
  • 举报
回复
有个jb用
yrb 2007-03-23
  • 打赏
  • 举报
回复
up
yrb 2007-03-23
  • 打赏
  • 举报
回复
vc++,接口我用vb描述,为了大家都能看懂。
konj 2007-03-23
  • 打赏
  • 举报
回复
用VB做的?
ToperRay 2007-03-22
  • 打赏
  • 举报
回复
谢谢
zzd8310 2007-03-22
  • 打赏
  • 举报
回复
楼主辛苦!
raymonzhao 2007-03-22
  • 打赏
  • 举报
回复
接分。
mochen5460 2007-03-22
  • 打赏
  • 举报
回复
楼主辛苦了,顶!
dashi 2007-03-22
  • 打赏
  • 举报
回复
谢谢,接分
长尾巴的悟空 2007-03-22
  • 打赏
  • 举报
回复
....sf
Grid++Report 报表件适用于VB.NET、C#、VB、VC、Delphi、C++Builder、Foxpro(VFP)、易语言等一切支持 COM 的开发工具。除了提供报表的统计分析、打印、打印预览、数据导出等功能,还提供独有的报表查询显示功能,让报表查询显示、打印、打印预览及数据导出等功能集成一体化实现。轻松实现通用报表、表格报表、动态报表、多层表头、票据与发票套打、交叉表、表中表及各种特殊报表等。提供详尽帮助文档与各种编程平台下的丰富例子,安装中包括可直接运行例子程序,安装后即刻体验此报表工具。包括简体中文版、繁体中文版与英文版。经过数年的发展,已经被国内多家有影响力的通用软件厂商采用,其用户遍布各行各业,已经成为用户受众面最广的国产报表开发工具。Grid++Report 报表组件具有如下特点:1、适用范围广:VB.NET、C#、VB、VC、Delphi、C++Builder、VFP、易语言等一切支持 COM 的开发工具。2、功能强大:实现普通格式报表、表格报表、多层表头、票据套打、交叉表等各种报表非常简便;报表完全可编程定义,非常适合开发通用软件中的动态报表。3、独有的报表查询显示功能:除了提供报表的打印、打印预览、数据导出等功能,还提供独有的报表查询显示功能,既提供报表查询与输出的集成一次性实现,又能保证数据的一致性与完整性。4、特有的分组单元格合并功能,轻松实现常见的中国式报表分组在列中展现并垂直居中。5、提供图表功能,在报表中直接实现图表功能。包括:饼图、叠加饼图、柱状图,连线图、散列点图等。6、报表数据导出格式丰富,格式包括:Excel、PDF、图像、HTML、文本,CSV 等。7、提供脚本编程功能,直接在报表模板中自定义报表行为,采用通用的 VBScript 与 JScript 脚本引擎。8、支持参数化报表查询SQL语句,轻松实现动态过滤条件筛选报表数据。9、报表查询显示时提供报表内容文字查找功能。10、全中文界面,针对中国报表进行了很多专门实现,如:报表表格线、财务金额线、大写金额、发票打印圆圈中画叉图标、负数红字显示、多层表头等。很多在国外报表件中很难实现的功能在本报表件中可以轻易实现。11、组件提供丰富交互事件,轻松实现报表穿透(透视)查询和报表交互。12、重新发布简单:只需分发两个 DLL 文件。13、易学易用:完全可视化设计,完善的复制/剪切/粘贴(Copy/Cut/Paste)和恢复重做(Undo/Redo)功能,专业的拖放操作与即时编辑功能。14、编写了完整详尽的帮助文档。提供了丰富例程,包括VB.NET、C#、VB、VC、Delphi、C++Builder、VFP、中文编程易语言。15、为 Delphi、C++Builder 编写专门的包装类,象使用 VCL 件一样使用 Grid++Report。16、支持所有常规条形码,打印条形码精度高易读取。
Grid++Report 是一高性能的报表开发工具,特别适用于管理信息系统,如ERP、进销存、财务等软件的报表开发。针对票据套打进行了专门实现,也是实现票据打印的好工具。Grid++Report是完全可编程的报表工具,是制作动态报表的最佳选择。针对中国式报表的特点进行了很多专门的设计,是为开发中国式报表量身定做的一报表工具。 Grid++Report 提供了具有超强数据展现能力的数据网格(DataGrid)部件,制作各种表格报表非常简便。运行时可通过事件响应使报表与用户交互。提供了可视化报表设计器,设计报表快速简单。在提供报表打印功能的同时,还提供了报表的查询显示功能,即像各种数据网格(DataGrid)件一样显示数据,让报表的查询显示与打印一次实现,既保持了数据的一致性又提高了开发效率,这也是 Grid++Report 与其它报表构件的最大区别。 Grid++Report 适用编程平台广泛,所有支持COM的开发平台都可以使用 Grid++Report,为VB.NET、C#、VB、VC、Delphi、C++Builder、易语言编写了大量例程。采用VC+COM+ATL+WTL开发,运行性能高,重新发布简单、发布文件小,且不依赖任何运行时库。总之,选择Grid++Report 报表件,将给大家带来轻松愉快的报表与打印开发过程,尽享其中独具匠心、简单明快、功能强大的美妙,为您的设计带来美观、高质、高效。

1,650

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 非技术类
社区管理员
  • 非技术类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧