TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Working with Excel Files in Python

22 点作者 kamaraju大约 1 年前

7 条评论

nameless912大约 1 年前
I tried to do this in a previous job, it's _hard_. Our requirements were to use the math in a spreadsheet to calculate some results (basically actuaries created a set of formulae in the spreadsheet, we paste in the data and pull out the result). The best solution we found was to actually utilize LibreOffice and manipulate the spreadsheet using LibreOffice's Python API. There's no other solution that provides relatively complete implementations of Excel's functionality, and also updates cell values correctly taking into account complex formulae. And it was _painful_ and involved a very fiddly docker container image, a custom shell script with some LD_LIBRARY_PRELOAD magic, and some other hacks I don't even remember anymore.
评论 #40442237 未加载
评论 #40446214 未加载
评论 #40446202 未加载
aidos大约 1 年前
For those that don’t know - xlsx files are just zips. Change the extension and open them to see all the xml lurking within.<p>For what it’s worth we use xlsxwriter and are happy with it.
评论 #40443088 未加载
评论 #40443562 未加载
matthewfelgate大约 1 年前
I wrote some Python scripts last year (with the help of chatGPT) that use openpyxl and they work great.
评论 #40442694 未加载
snehk大约 1 年前
I&#x27;m so happy that, when working with .xlsx files, I usually only need the results. That&#x27;s why I always convert them (put them in a DB) and then do all the work there and export the results.<p>I read that Pandas works well, too, but I haven&#x27;t really tried it.
Pinus大约 1 年前
Why so many packages? Does it mean that all of them have some critical flaw, <i>and</i> are so hard to fix (for some reason) that everyone just starts from scratch instead of fixing an existing one?
JoeyBananas大约 1 年前
There is a certain type of office drone that likes to force bad ideas that involve abusing Excel spreadsheets to do something stupid. By doing what they want, you are doing them a disservice. It&#x27;s like feeding a stray cat or other urban pest.
ocdbg大约 1 年前
Job once had a requirement to generate reports in XLSB format.<p>Failed to find any Linux-based FOSS solution. Had to run a Windows Server.