获取使用Apache POI在Excel文件中的列的名字 [英] Get columns' names in excel file using Apache POI

查看:525
本文介绍了获取使用Apache POI在Excel文件中的列的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用获得的列名 Excel中文件的的Apache POI ,以确保列排序预期

i was wondering how to get the column names in excel file using Apache POI, to make sure that the columns are ordered as expected.

推荐答案

或者这样:

cell.getSheet().getRow(0).getCell(currentcellIndex)
    .getRichStringCellValue().toString()

不知道从行0开始。
希望逻辑的作品。

Not sure if rows start from 0. Hope the logic works.

这篇关于获取使用Apache POI在Excel文件中的列的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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