Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Mon May 24, 2021 1:24 pm

my code run at linux , when run to sheet.saveToImage(path);
program will throw : Cannot find a required cmap table.

but run at mac is ok, please tall me why, thank you

java.lang.IllegalStateException: Cannot find a required cmap table.
at com.spire.xls.packages.sprFcA.<init>(Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprMaA.spr (Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprMaA.spr (Unknown Source)
at com.spire.xls.packages.sprMZa.spr (Unknown Source)
at com.spire.xls.packages.sprLCA.spr (Unknown Source)
at com.spire.xls.packages.sprDAA.spr (Unknown Source)
at com.spire.xls.packages.spruaA.spr (Unknown Source)
at com.spire.xls.packages.sprCAA.<init>(Unknown Source)
at com.spire.xls.packages.sprwiA.spr (Unknown Source)
at com.spire.xls.packages.sprHTb.spr (Unknown Source)
at com.spire.xls.packages.sprtHA.spr (Unknown Source)
at com.spire.xls.packages.sprtHA.spr (Unknown Source)
at com.spire.xls.packages.sprigA.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorksheet.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorksheet.saveToImage(Unknown Source)
at com.jiliguala.msg.utils.ExcelUtil.excelToPNG(ExcelUtil.java:69)



After I modified my code, it runs smoothly

BufferedImage image = sheet.toImage(sheet.getFirstRow(), sheet.getFirstColumn(), sheet.getLastRow(), sheet.getLastColumn());
File file = new File(FILE_PATH + fileName + FILE_TYPE);
ImageIO.write(image,"png",file);

majun9879
 
Posts: 2
Joined: Mon May 24, 2021 1:16 pm

Tue May 25, 2021 9:55 am

Hello,

Thank you for your inquiry.
I used the latest Spire.XLS (Spire.XLS for Java Version:4.5.3) to test the code you provided (sheet.saveToImage(path)) on Linux, but did not replicate your issue. If you were not using the latest version, we recommend you give it a try firstly. If the problem still exists, please provide your complete test code and your input excel file. You could attach them here or send to us via email (support@e-iceblue.com). Thanks in advance.
Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 230
Joined: Wed Apr 07, 2021 2:50 am

Wed Jun 02, 2021 8:12 am

Hello,

Greetings from e-iceblue.
How is your issue going? Can you give us some feedback at your convenience? Thanks in advance.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 230
Joined: Wed Apr 07, 2021 2:50 am

Mon Jun 07, 2021 6:42 am

Annika.Zhou wrote:Hello,

Greetings from e-iceblue.
How is your issue going? Can you give us some feedback at your convenience? Thanks in advance.

Sincerely,
Annika
E-iceblue support team


linux system lacks corresponding font library,spire is OK 。 :D

majun9879
 
Posts: 2
Joined: Mon May 24, 2021 1:16 pm

Mon Jun 07, 2021 8:43 am

Hello,

Glad to hear that your issue has been solved.
If you have other questions about using Spire.XLS in the future, please feel free to contact us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 230
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.XLS

cron