You need to add dependency of ‘poi-ooxml‘ to your project, and version >= 4.1.2 adddependencypenprojectversionxml