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---

相关推荐
码界筑梦坊21 分钟前
98-基于Python的网上厨房美食推荐系统
开发语言·python·美食
计算机源码社40 分钟前
分享一个基于Hadoop的二手房销售签约数据分析与可视化系统,基于Python可视化的二手房销售数据分析平台
大数据·hadoop·python·数据分析·毕业设计项目·毕业设计源码·计算机毕设选题
lpfasd12342 分钟前
非中文语音视频自动生成中文字幕的完整实现方案
开发语言·python
大志说编程1 小时前
LangChain框架入门15:深度解析Retrievers检索器组件
python·langchain·llm
₯㎕星空&繁华1 小时前
Linux-地址空间
linux·运维·服务器·经验分享·笔记
小米里的大麦1 小时前
023 基础 IO —— 重定向
linux
风铃7771 小时前
c/c++ Socket+共享内存实现本机进程间通信
linux·c语言
NEUMaple2 小时前
python爬虫(四)----requests
开发语言·爬虫·python
bluebonnet272 小时前
【Python】一些PEP提案(六):元类、默认 UTF-8、Web 开发
开发语言·前端·python
计算机毕设残哥2 小时前
完整技术栈分享:基于Hadoop+Spark的在线教育投融资大数据可视化分析系统
大数据·hadoop·python·信息可视化·spark·计算机毕设·计算机毕业设计