ExcelJSNode 的 Excel 模块
ExcelJS 是一个 Node.js 模块,可用来读写和操作 XLSX 和 JSON 电子表格数据和样式。
示例代码:
// Add column headers and define column keys and widths // Note: these column structures are a workbook-building convenience only, // apart from the column width, they will not be fully persisted. worksheet.columns = [ { header: "Id", key: "id", width: 10 }, { header: "Name", key: "name", width: 32 }, { header: "D.O.B.", key: "DOB", width: 10 } ]; // Access an individual columns by key, letter and 1-based column number var idCol = worksheet.getColumn("id"); var nameCol = worksheet.getColumn("B"); var dobCol = worksheet.getColumn(3); // set column properties // Note: will overwrite cell value C1 dobCol.header = "Date of Birth"; // Note: this will overwrite cell values C1:C2 dobCol.header = ["Date of Birth", "A.K.A. D.O.B."]; // from this point on, this column will be indexed by "dob" and not "DOB" dobCol.key = "dob"; dobCol.width = 15; // iterate over all current cells in this column dobCol.eachCell(function(cell, rowNumber) { // ... }); // iterate over all current cells in this column including empty cells dobCol.eachCell({ includeEmpty: true }, function(cell, rowNumber) { // ... });
评论
超级好用的Python模块——glob模块
为了更加方便、快捷地查找文件/文件夹,再介绍一个超级好用的Python模块——glob模块。glob模块可以查找符合特定规则的文件/文件夹,并将搜索到的结果返回到一个列表中。该模块之所以强大的原因在于,它支持几个正则通...
Python与算法社区
0
ngx_sqliteNginx 的 SQLite 模块
ngx_sqlite是嵌入sqlite 数据库的nginx模块。通过强大的nginxserver,可以使用http协议访问sqlite数据库。环境-sqlite3-nginx-1.6.3+ 安装```
ngx_sqliteNginx 的 SQLite 模块
0
nginx-tfsNginx的TFS模块
nginx-tfs是Nginx的扩展模块用于访问淘宝的TFS文件系统。这个模块实现了TFS的客户端,为TFS提供了RESTfulAPI。TFS的全称是TaobaoFileSystem,是淘宝开源的一个
nginx-tfsNginx的TFS模块
0
mod_auth_openidApache的OpenID模块
mod_auth_openid 是一个Apache HTTP Server 的扩展模块,用来实现对
mod_auth_openidApache的OpenID模块
0