I am referencing the version 3.7 of the Apache POI and I am getting a \"cannot be resolved\" error when I do:
import org.apache.poi.xssf.usermodel.XSSFWorkbo
I Got the Solution Guys
You need to keep some points in your mind .
There are two different dependency one is (poi) & other dependency is (poi- ooxml) but make sure you must use poi-ooxml dependency in your code.
Just Add the following dependency in pom.xml & Save it.
org.apache.poi
poi-ooxml
3.9
3 .After you have saved the pom.xml then you need to try a small thing ,Use (.) operator will try to import/fetch it & finally will not see any sort of error because now it has imported that thing in your package.
Sample Code to Understand Better !!
package ReadFile;// package
import org.apache.poi.xssf.usermodel.XSSFWorkbook; // automatically added to your code after importing
public class Test
{
public static void Hello() // Method
{
XSSFWorkbook workbook = new XSSFWorkbook();
}
}
I tried my best to give you the solution , If you face any issue comment here i will try
to solve it .
Keep Learning Guys !!