I have an excel report (xlsx) which I read into a com.spire.xls.Workbook.
All the text in the excel spreadsheet is in font Arial, and the spreadsheet contains some unicode characters.
If I save the workbook as an excel file (using workbook.saveToStream) it generates the excel file correctly and all text displays correctly in Arial, including cells with the unicode characters.
However, when I save the workbook as PDF (using workbook.saveToStream with FileFormat.PDF) the cells that contain unicode characters display in Times New Roman font instead of Arial.
How can I get the cells containing unicode characters to display using the cell formatted font of Arial?
Attached a simplified excel report showing how the data is retrieved from one worksheet and inserted into the report page (the data worksheet would normally be hidden). Since formulas are often used in retrieving the data from the Data worksheet we cannot use the excel superscript feature and need to use unicode characters.
I'm using Spire.XLS for Java. Code snippet for generating excel or PDF report:
//Save as pdf or excel depending on users selection
if (reportParameters.getReportDownloadFormat().equals(ReportParameters.DownloadFormat.PDF)) {
spireXlsWorkbook.saveToStream(response.getOutputStream(), FileFormat.PDF);
} else {
spireXlsWorkbook.saveToStream(response.getOutputStream());
}