如何在不使用外部jar的情况下使用Java读取Excel文件 [英] How to read excel file with Java without external jars

查看:51
本文介绍了如何在不使用外部jar的情况下使用Java读取Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试读取excel文件并将所有数据传递给DB.我找到了一些代码示例,但所有示例都需要外部jar.如何仅使用标准库读取excel文件?

I'm trying to read excel file and pass all the data to DB. I found a few code examples but all of them required external jars. How can I read excel files using only the standard library?

推荐答案

如果您不想使用库,则必须下载此处此处.

IF you don't want to use a library then you will have to download the Excel file format specs from MS and write an Excel parser yourself (which is extremely complicated and takes > 10 years for one developer). For the OpenXML format spec see here and here.

因此,我真的建议为此使用一个库...

Thus I really recommend using a library for that...

尝试 Apache POI -用于处理MS Office文档的免费Java库.

Try Apache POI - a free Java library for dealing with MS Office documents..

这篇关于如何在不使用外部jar的情况下使用Java读取Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆