Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Mon Mar 14, 2022 8:48 pm

Hello, If I run the code below

Code: Select all
import com.spire.xls.*;

public class toPDF {
    public static void main(String[] args) {
        String inputFile = "data/ExcelSampleN.xlsx";
        String outputFile = "output/ToPDF_out.pdf";

        //Create a workbook
        Workbook workbook = new Workbook();
        try
        {
            //Load a file
            workbook.loadFromFile(inputFile);
            //Fit to page
            workbook.getConverterSetting().setSheetFitToPage(true);
            //Save to PDF file
            workbook.saveToFile(outputFile, FileFormat.PDF);
        }finally {
            workbook.dispose();
        }
    }
}


with jdk-17.0.2 (Open jdk)

I get the error bellow. The excel converter only works with sun jdk (oracle) ? if yes we have a problem of jdk license,

I ask because if I run with jdk 1.8 for example its works

Exception in thread "main" java.lang.IllegalAccessError: class com.spire.office.packages.sprjhi (in unnamed module @0x15ff3e9e) cannot access class sun.security.action.GetPropertyAction (in module java.base) because module java.base does not export sun.security.action to unnamed module @0x15ff3e9e
at com.spire.office.packages.sprjhi.spr▥┩(Unknown Source)
at com.spire.office.packages.sprjhi.spr┿┑(Unknown Source)
at com.spire.office.packages.sprjhi.<init>(Unknown Source)
at com.spire.office.packages.sprxgg.<init>(Unknown Source)
at com.spire.office.packages.sprzfg.<init>(Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.<init>(Unknown Source)
at com.spire.xls.Workbook.<init>(Unknown Source)
at br.com.siq.xlsToPDF.main(xlsToPDF.java:14)

meneghette
 
Posts: 42
Joined: Tue Mar 08, 2022 12:10 pm

Tue Mar 15, 2022 9:42 am

Hello,

Thanks for your inquiry.
Sorry for the inconvenience caused, I have posted this issue into our bug tracking system with the ticket number SPIREXLS-3733, once it is resolved or there is any update, I will inform you immediately.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Tue Mar 15, 2022 11:46 am

Please send me what jdk version is supported, I search in your documentation and I did not founded

meneghette
 
Posts: 42
Joined: Tue Mar 08, 2022 12:10 pm

Wed Mar 16, 2022 2:32 am

Hello,

Our Spire.XLS supports JDK1.6 and above versions, and it is also compatible with OpenJDK. The issue you encountered is caused by the failure of version confusion. Our developer will fix it as soon as possible.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Tue Apr 19, 2022 9:43 am

Hi,

Thank you for your patience.
We are pleased to inform you that we have released a new version that addresses your SPIREXLS-3733 problem. Please download the new version from the link below.
Download from Website: https://www.e-iceblue.com/Download/xls-for-java.html
If you downloaded from the Maven repository, please change the pom setting to:
<repositories>
<repository>
<id>com.e-iceblue</id>
<url>https://repo.e-iceblue.com/repository/maven-public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId> e-iceblue </groupId>
<artifactId>spire.xls</artifactId>
<version>5.4.3</version>
</dependency>
</dependencies>

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Tue Apr 19, 2022 2:05 pm

Hello we are using Spire.Office for Java

If I download the lastest version of Spire.Office for Java will be ok?

meneghette
 
Posts: 42
Joined: Tue Mar 08, 2022 12:10 pm

Wed Apr 20, 2022 8:14 am

Hi,

Thank you for your reply.
No, the Spire.Office does not include these fixes yet, as we always prioritize updating individual products. The next Spire.Office will contain the fixes, once it is released, we will inform you.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Fri Sep 23, 2022 8:54 am

Hi,

Our latest version(Spire.Office for Java Version:7.9.6) contains a fix for the SPIREXLS-3733 issue. Please download it from the link below.
Download from Website: https://www.e-iceblue.com/Download/office-for-java.html
If you downloaded from the Maven repository, please change the pom setting to:
<repositories>
<repository>
<id>com.e-iceblue</id>
<url>https://repo.e-iceblue.com/repository/maven-public/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId> e-iceblue </groupId>
<artifactId>spire.office</artifactId>
<version>7.9.6</version>
</dependency>
</dependencies>

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.XLS