perl、python、tcl语法中读写Excel的模块

perl、python、tcl语法中读写Excel的模块

perl、python、tcl语法中存在读写xls和xlsx格式的模块分别有:

python

‌读取 Excel‌

xlrd‌ :支持传统 .xls 格式的读取‌
pandas‌:通过 read_excel() 方法支持 .xls 和 .xlsx 格式‌

‌写入 Excel‌

xlwt‌ :生成 .xls 格式文件‌
‌openpyxl‌:支持 .xlsx 格式的高效读写

网站资源:

https://editor.csdn.net/md/?articleId=146096071

‌Perl‌

‌读取 Excel‌

Spreadsheet::ParseExcel‌ :解析 .xls 文件‌
‌Spreadsheet::ParseXLSX‌:支持 .xlsx 格式‌

‌写入 Excel‌

‌Excel::Writer::XLSX‌ :生成 .xlsx 文件‌
‌Spreadsheet::WriteExcel‌(旧版):生成 .xls 文件

网站资源:

https://metacpan.org/author/JMCNAMARA

案例:

perl 复制代码
use Spreadsheet::WriteExcel;
# Create a new Excel workbook
my $workbook = Spreadsheet::WriteExcel->new('perl.xls');
# Add a worksheet
$worksheet = $workbook->add_worksheet();
#  Add and define a format
$format = $workbook->add_format(); # Add a format
$format->set_bold();
$format->set_color('red');
$format->set_align('center');
# Write a formatted and unformatted string, row and column notation.
my $col, $row;
$col = $row = 0;
$worksheet->write($row, $col, 'Hi Excel!', $format);
$worksheet->write(1,    $col, 'Hi Excel!');
# Write a number and a formula using A1 notation
$worksheet->write('A3', 1.2345);
$worksheet->write('A4', '=SIN(PI()/4)');

Spreadsheet::WriteExcel

模块存在方法有:

WORKBOOK METHODS

The Spreadsheet::WriteExcel module provides an object oriented interface to a new Excel workbook. The following methods are available through a new workbook.

new()

add_worksheet()

add_format()

add_chart()

add_chart_ext()

close()

compatibility_mode()

set_properties()

define_name()

set_tempdir()

set_custom_color()

sheets()

set_1904()

set_codepage()

‌TCL‌

‌读写 Excel‌

tcom 模块‌:通过 COM 接口调用 Excel 应用程序(需安装 Microsoft Office)

‌第三方扩展‌(如 tcl-excel):需手动编译或集成外部工具

网站资源:

https://wiki.tcl-lang.org/page/tcom

---END---

相关推荐
深思慎考2 分钟前
LinuxC++项目开发日志——高并发内存池(1-定长内存池)
linux·c++
THMAIL12 分钟前
机器学习从入门到精通 - 机器学习调参终极手册:网格搜索、贝叶斯优化实战
人工智能·python·算法·机器学习·支持向量机·数据挖掘·逻辑回归
ERP老兵-冷溪虎山13 分钟前
Python/JS/Go/Java同步学习(第三篇)四语言“切片“对照表: 财务“小南“纸切片术切凭证到崩溃(附源码/截图/参数表/避坑指南/老板沉默术)
java·javascript·python·golang·中医编程·四语言同步学习·职场生存指南
科技树支点15 分钟前
无GC的Java创新设计思路:作用域引用式自动内存管理
java·python·go·web·编程语言·编译器
川石课堂软件测试1 小时前
Oracle 数据库如何查询列
linux·数据库·sql·功能测试·oracle·grafana·prometheus
THMAIL2 小时前
机器学习从入门到精通 - 集成学习核武器:随机森林与XGBoost工业级应用
人工智能·python·算法·随机森林·机器学习·集成学习·sklearn
程序员miki3 小时前
Pytorch的CUDA版本安装使用教程
人工智能·pytorch·python
光电的一只菜鸡3 小时前
ubuntu之坑(十九)——VMware虚拟机扩容磁盘
linux·数据库·ubuntu
小冷coding3 小时前
随时随地写代码:Jupyter Notebook+cpolar让远程开发像在本地一样流畅
ide·python·jupyter
偷心伊普西隆3 小时前
Pandas DataFrame 指南
python·数据分析·pandas