当前位置: 首页 > article >正文

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

案例:

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—


http://www.kler.cn/a/581678.html

相关文章:

  • 文档解析:PDF、图片内容deepseek解析出错怎么办?
  • 设备物联网无线通信,ESP32-C3芯片模组方案,智能化联动控制
  • 从零到多页复用:我的WPF MVVM国际化实践
  • 人脸识别之数据集中 PI20 和 CFMT 之间关联的模型预测贝叶斯(Python+论文代码实现)
  • 开发常用软件
  • CVPR2025轨迹预测相关论文以及自动驾驶端到端相关论文
  • Android Service封装实战:基于Binder与接口的高效通信方案
  • 算法手记1
  • 【技术白皮书】内功心法 | 第二部分 | Telnet远程登录的工作原理
  • 使用pytest-xdist让自动化并行测试变得轻松简单
  • uniapp在APP平台(Android/iOS)选择非媒体文件
  • AI与.NET技术实操系列:ML.NET篇
  • conda 配置新环境时package will be install 和 package will be download 的区别
  • 商业智能BI的未来,如何看待AI+BI这种模式?
  • 深入探索 Unsafe Rust:超越编译器安全保障的超能力
  • golang 高性能的 MySQL 数据导出
  • [算法] 结点K个一组的链表反转(hard)
  • Spring Cloud Alibaba 实战:Sentinel 保障微服务的高可用性与流量防护
  • Trae AI 辅助修复uniapp 微信小程序的Bug
  • Flink之SQL join