且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在没有 Apache POI 的情况下解析 Excel 文件

更新时间:2022-06-16 00:28:04

CSV 是一种文本格式,因此可以使用分隔符进行解析.旧 Excel 是一种二进制和专有格式,因此需要巧妙的解码.新的 Excel 格式是压缩的 XML,但在将其转换为像逐个读取单元格这样简单的内容之前,还应该了解该文档的结构.因此,您的问题的答案是否定的,您需要使用 Apache POI,而且 - 这没有任何问题.

CSV is a text format, so it can be parsed using the delimiters. Old Excel is a binary and proprietary format so it needs clever decoding. The new Excel format is zipped XMLs, but one should also understand the structure of this document before it could be transformed into something as simple as reading cells one by one. So the answer to your question is no, you'll need to use Apache POI, and also - there's nothing wrong with that.

顺便说一句,在成为优秀开发人员的道路上,您需要在寻求帮助之前先学会做一些自己的研究.动手是***的学习方式.

As a side note, on the path to become a good developer you will need to learn to do a bit of your own research before looking for help. Get your hands dirty is the best way to learn things.