如何解析Excel文件

时间:2018-11-05 10:24:13

标签: sql sql-server

我在Excel中有很多行,例如

TALLON | BLACK | 44

我需要提取管道之间的值

因此,我只需要为上述示例行获取值BLACK。如何提取这些值?

1 个答案:

答案 0 :(得分:1)

一种选择是将FieldListModel fieldListModel = new FieldListModel(); ObjectMapper mapper = new ObjectMapper(); fieldListModel = mapper.readValue(form.getFieldList(), new FieldListTypeReference()); request.setFieldList(fieldListModel.getEntries()); // At bottom of this class I have my named static inner class - Sonar scan requested this static class FieldListTypeReference extends TypeReference<FieldListModel> {} 函数与substring()(管道)一起使用charindex()函数作为搜索表达式:

|

Rextester Demo