开源组件ExcelReport(为.NET Core而来)使用手册

转自:韩兆新

cnblogs.com/hanzhaoxin/p/10505872.html

ExcelReport转眼已经开源4年了,期间有很长时间也停止了对它的维护。18年年末有人联系到我,说“兄弟,ExcelReport不错,但什么时候支持.NET Core呢?”。我寥寥的回了几句搪塞的话,也没当回事。后来这兄弟又来问我,恰好这时临近春节,我在老家休年假,也没什么事。就答应了。

ExcelReport是什么?

考虑到ER的老用户并不多,这里有必要介绍下ExcelReport是什么? ExcelReport是一款基于模板的Excel报表生成组件。 

它基于关注点分离的理念,将数据与样式、格式分离。让模板承载样式、格式,在可视化条件下编辑。让开发人员只需要关注数据,从而简化Excel报表的开发过程。

一点概念?

模板:承载报表的格式&数据的样式

渲染器:指定模板与数据的关系

介绍模板

模板支持两种标签:

  • $[]:parameter

    parameter:是给数据占坑的,等待被数据覆盖。

  • <[]、>[]:repeater

    repeater:是包裹parameter的,指定一组参数的渲染边界。等待数据驱动重复渲染。

介绍渲染器

  • SheetRenderer:指定一个sheet模板与数据的关系

  • RepeaterRenderer:指定一组parameter标签与数据的关系

  • ParameterRenderer:指定一个parameter标签与数据的关系

组件介绍

5ac2c6734cfa7c19352f3387bda9981c.jpeg

关系

4e64609b0cc7422b741869f32d89cc1e.png

快速入门

步骤一:定义模板

29c4c52909944670a01076dcec3eefc5.jpeg

步骤二:引入模板

c623797021e877fe5d0f11c51f7f5a5c.png

步骤三:代码

c0dbcd3d4647741071c321304172651b.png

结果

e9aab70097baea9bca6e76dc49b2042e.jpeg

更多示例参照:

https://github.com/hanzhaoxin/ExcelReport/tree/master/examples

- EOF -

技术群:添加小编微信dotnet999

公众号:dotnet讲堂

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Excel Report Builder<br>Excel Report 万能报表平台<br>Excel 使用WEB服务(webservice)访问远程数据库<br>使用本软件可以使你的应用系统(数据库)和excel相连。<br>可以把它嵌入到你的应用系统里,做为应用系统的外挂程序。<br>可以利用excel强大的编辑功能,随心所欲地开发出精美的报表。<br>本软件基于Web Service(Web服务)新技术,所以它支持web网络,<br>可以通过Internet访问远程数据。<br>只要你稍懂SQL,就可以在Excel Report 万能报表平台上设计报表。<br>通过设置字段,参数等信息来设计报表。<br>BI智能报表,支持透视表。<br>提供存储过程接口,便于用户二次开发。<br>有用户管理,报表权限的管理。<br>支持多语种。 <br>软件环境:<br> 客户端: Windows 2000及以上版本,Microsoft Office 2000及以上版本<br> 服务器端:Windows和Linux都可以,jsdk1.4,tomcat5<br> 数据库:支持Oracle, SQL Server 等数据库。<br>下载地址:<br> SQL Server SP3:<br>http://203.208.248.203:81/pan/Excel/sql2ksp3.exe<br>SQL Server SP4:<br>http://download.microsoft.com/download/9/b/f/9bff6646-2cdb-4069-ada0-548be9cb9338/SQL2000-KB884525-SP4-x86-CHS.EXE<br>报表安装包:<br>http://203.208.248.203:81/pan/Excel/j2sdk-1_4_2_06-windows-i586-p.exe<br>http://203.208.248.203:81/pan/Excel/jakarta-tomcat-5.0.27.exe<br><br><br>http://203.208.248.203:81/pan/Excel/Excel_Report_Setup.rar<br>联系方式:<br> http://pansoft.ik8.com<br> QQ: 10124900<br>MSN: [email protected]<br>E_Mail: [email protected]<br><br><br>Excel Report Builder<br>Excel Report Builder is an easy and convenient tool for the creation and customization of reports which takes advantage of the formatting and presentation capabilities of Microsoft Excel. The program allows the rapid construction of reports.A GUI style design environment, which allows the user to design their reports visually inside MS Excel. Reports can be saved and then viewed and printed as pure Excel documents. <br>The reports are created and printed rapidly.In fact, it is by harnassing the power of Excel that gives Excel Report Builder these abilities.No technical knowledge is needed in order for the user to customise his or her own reports. <br><br>Key Features of the Database Report Builder for Excel include:<br> Report creation using Microsoft Excel<br> Get data through webservice,so you can get remote data <br> Support of the SQL-queries for the data sets creation<br> Calling of the stored procedures for the data sets creation<br> Creation of the reports with parameters<br> Work with the Microsoft Excel macros<br> Charts creation in a report<br><br>Software:<br> Client: Windows 2000 or above,Microsoft Office 2000 or above<br> Server: jsdk1.4,tomcat5<br> Database: Oracle or SQL Server <br>Download:<br>SQL Server SP3:<br>http://203.208.248.203:81/pan/Excel/sql2ksp3.exe<br>SQL Server SP4:<br>http://download.microsoft.com/download/9/b/f/9bff6646-2cdb-4069-ada0-548be9cb9338/SQL2000-KB884525-SP4-x86-CHS.EXE<br>Excel Report Builder:<br>http://203.208.248.203:81/pan/Excel/j2sdk-1_4_2_06-windows-i586-p.exe<br>http://203.208.248.203:81/pan/Excel/jakarta-tomcat-5.0.27.exe<br><br><br>http://203.208.248.203:81/pan/Excel/Excel_Report_Setup.rar<br><br><br>Contact:<br> http://pansoft.ik8.com <br> QQ: 10124900<br>MSN: [email protected]<br>E_Mail: [email protected]<br><br>
Excel Report BuilderExcel Report 万能报表平台Excel 使用WEB服务(webservice)访问远程数据库使用本软件可以使你的应用系统(数据库)和excel相连。可以把它嵌入到你的应用系统里,做为应用系统的外挂程序。可以利用excel强大的编辑功能,随心所欲地开发出精美的报表。本软件基于Web Service(Web服务)新技术,所以它支持web网络,可以通过Internet访问远程数据。只要你稍懂SQL,就可以在Excel Report 万能报表平台上设计报表。通过设置字段,参数等信息来设计报表。BI智能报表,支持透视表。提供存储过程接口,便于用户二次开发。有用户管理,报表权限的管理。支持多语种。 软件环境: 客户端: Windows 2000及以上版本,Microsoft Office 2000及以上版本 服务器端:Windows和Linux都可以,jsdk1.4,tomcat5 数据库:支持Oracle, SQL Server 等数据库。下载地址: http://203.208.248.203:81/pan/Excel/Excel_Report_Setup.rar相关软件下载地址: Jdk 1.4:http://203.208.248.203:81/pan/Excel/j2sdk-1_4_2_06-windows-i586-p.exeTomcat5:http://203.208.248.203:81/pan/Excel/jakarta-tomcat-5.0.27.exe SQL Server SP3:http://203.208.248.203:81/pan/Excel/sql2ksp3.exeSQL Server SP4:http://download.microsoft.com/download/9/b/f/9bff6646-2cdb-4069-ada0-548be9cb9338/SQL2000-KB884525-SP4-x86-CHS.EXE联系方式: http://pansoft.ik8.com QQ: 10124900MSN: [email protected]_Mail: [email protected]Excel Report BuilderExcel Report Builder is an easy and convenient tool for the creation and customization of reports which takes advantage of the formatting and presentation capabilities of Microsoft Excel. The program allows the rapid construction of reports.A GUI style design environment, which allows the user to design their reports visually inside MS Excel. Reports can be saved and then viewed and printed as pure Excel documents. The reports are created and printed rapidly.In fact, it is by harnassing the power of Excel that gives Excel Report Builder these abilities.No technical knowledge is needed in order for the user to customise his or her own reports. Key Features of the Database Report Builder for Excel include: Report creation using Microsoft Excel Get data through webservice,so you can get remote data Support of the SQL-queries for the data sets creation Calling of the stored procedures for the data sets creation Creation of the reports with parameters Work with the Microsoft Excel macros Charts creation in a reportSoftware: Client: Windows 2000 or above,Microsoft Office 2000 or above Server: jsdk1.4,tomcat5 Database: Oracle or SQL Server Download: http://203.208.248.203:81/pan/Excel/Excel_Report_Setup.rarOther Softwares: Jdk 1.4:http://203.208.248.203:81/pan/Excel/j2sdk-1_4_2_06-windows-i586-p.exeTomcat5:http://203.208.248.203:81/pan/Excel/jakarta-tomcat-5.0.27.exeSQL Server SP3:http://203.208.248.203:81/pan/Excel/sql2ksp3.exeSQL Server SP4:http://download.microsoft.com/download/9/b/f/9bff6646-2cdb-4069-ada0-548be9cb9338/SQL2000-KB884525-SP4-x86-CHS.EXEContact: http://pansoft.ik8.com QQ: 10124900MSN: [email protected]_Mail: [email protected]
在LabWindows中,可以使用ExceReport工具箱来将数据写入现有的Excel文件中并保存。以下是基本步骤: 1. 打开ExceReport工具箱,可以通过在LabWindows中打开“Tools”->“Add-Ins”->“ExceReport”来完成。 2. 在ExceReport工具箱中,选择“Excel Report”选项卡,配置Excel文件路径和工作表名称。 3. 在代码中,使用“Excel_ReportWriteData”函数将数据写入Excel文件中。 4. 使用“Excel_ReportSaveAndClose”函数保存Excel文件。 下面是一个示例代码,演示如何使用ExceReport工具箱将数据写入现有的Excel文件中并保存: ```c #include <utility.h> #include <excelreport.h> int main() { // 打开ExceReport工具箱 Excel_ReportOpen(); // 配置Excel文件路径和工作表名称 Excel_ReportSetFilePath("D:\\data.xlsx"); Excel_ReportSetWorksheet("Sheet1"); // 写入数据 double data[] = {1.0, 2.0, 3.0, 4.0}; for (int i = 0; i < 4; ++i) { Excel_ReportWriteData(i+1, 1, data[i]); } // 保存Excel文件 Excel_ReportSaveAndClose(); // 关闭ExceReport工具箱 Excel_ReportClose(); return 0; } ``` 注意,在这个例子中,使用了ExceReport工具箱来打开Excel文件,配置工作表名称,并将数据写入Excel文件中。最后,使用“Excel_ReportSaveAndClose”函数保存Excel文件并关闭ExceReport工具箱。 需要注意的是,需要在代码中包含头文件`<excelreport.h>`以使用ExceReport工具箱。此外,ExceReport工具箱还提供了其他的函数和选项,具体使用方法可以参考相关的文档和示例。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值