Java operation Excel file

1. Reference 

2. Demand

  • The java program reads a column of data in an excel file,
  • According to the given value, find from this column of data and return a value in the same row and another column

3. Realize 

  • Use an off-the-shelf library to read the values ​​of two columns, the two values ​​in the same row form a hash value, and the two columns of data form a hash table
  • Find the key of the hash table and return the corresponding value
  • jar包:http://poi.apache.org/download.html
  • Download: poi-bin-3.17-20170915.zip
  • Use: poi-3.17.jar seems to work

4. Code 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325055835&siteId=291194637