When inputting a long text in a cell, Excel provides two ways to enable you to fit the text within one cell, they are: wrap text and shrink to fit . In the previous article, I already introduced how to wrap text in Java, in this article, I am going to demonstrate how to shrink text to fit the text in a cell in Java. The library I used Free Spire.XLS for Java Before using the following code, you need to add dependencies for including Free Spire.XLS for Java library in your Java project. For maven project, add the following code to your project’s pom.xml file. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 <repositories> <repository> <id>com.e-iceblue</id> <name>e-iceblue</name> <url...
File APIs for Word/Excel/PowerPoint/PDF
A blog about Microsoft Office and PDF document development using .NET and Java.