- Code: Select all
import java.io.IOException;
import com.spire.xls.FileFormat;
import com.spire.xls.Workbook;
public class ExcelConversion {
public void convert() throws IOException {
Workbook workbook = new Workbook();
workbook.loadFromFile("yes.xlsx");
//Save as PDF document
workbook.saveToFile("ExcelToPDF.pdf",FileFormat.PDF);
}
}
java.lang.IllegalAccessError: class com.spire.xls.packages.sprRFA (in unnamed module @0xfe48b45) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module
I'm using spire.xls.free version 5.1.0 with the intention of purchasing the product if it works.