[#2755] - XLSX - Cell font size differs from character font size

Category:
Bug report
Priority:
Normal
Status:
Closed
Project: Severity:
Minor
Resolution:
Fixed
Component: Reproducibility:
Always
Assigned to:

Font size set in iReport is 8px and when the report is exported to xlsx the cell has
size of 7px and characters inside the cell have 8px (when you enter cell you can see character font size).
The same behavior is with markup set to "none" and "html" and with font size fix set to "true" and "false"

I've checked the generated xml definition of xlsx and it's defined that way, so it's
not Excel issue.

JRXlsExporter get's font sizes (almost) right but doesn't interpret html style definitions.
XLS fonts are 1px smaller.

I've attached report definition and excel output. I've defined dummy query that selects from
dual on Oracle, it can be replaced with any dummy data source.

I assume that iReport 5.0.1 uses library 5.0.1 and server 5.0.0 uses library 5.0.0.
iReport export is a little better, but has the same problem for font size 10px.
And it seems that it handles SansSerif differently than other fonts, but that could be
Excel issue...

AttachmentSize
Package icon excel output8.55 KB
Binary Data font-test.jrxml5.82 KB
v5.0.0
zstipanicev's picture
Joined: Apr 2 2012 - 4:50am
Last seen: 7 years 11 months ago

6 Comments:

#1

Hi, I have the same problem.
I am using 6.2.0 release.
I set net.sf.jasperreports.export.xls.font.size.fix.enabled = true but when I export to XLS fixing is ok, but XLSX set the correct size but graphically is wrong, size showed in cell is not fixed.

#2

@jmrm87: hello, did you notice this issue in Jaspersoft Studio or in JasperReports Server?
I tested a local JRXML sample file in both Jaspersoft Studio and JasperReports Server 6.2.0, and couldn't reproduce the issue. Font sizes showed in cells were all decreased as expected.
Could you attach a JRXML sample here that can be used to reproduce the problem?

Thank you,
Sanda

#3
  • Status:New» Feedback Requested
#4
  • Assigned:nobody» shertage
#5

Hi,

Anything new on this one?

Thanks,
Teodor

#6
  • Resolution:Open» Fixed
  • Status:Feedback Requested» Closed

I'm closing this, since the font sizes are displayed with correct values in both XLS and XLSX exports. See attached samples.

AttachmentSize
Binary Data font-test.jrxml5.88 KB
Office spreadsheet icon font-test.xls6 KB
File font-test.xlsx5.02 KB
Feedback
randomness