At some point, you may want to use multiple fonts and font colors for outstanding some specific words in one Excel cell. In this article, I’m going to show you how to use multiple fonts and font colors in one Excel cell programmatically in Java by using Free Spire.XLS for Java API. Before using the following code, you need to download Free Spire.XLS for Java API, unzip the package and then add Spire.Xls.jar in the lib folder into your project. If you’re creating maven projects, you can install Free Spire.XLS for Java API from maven repository . Using the code import com.spire.xls.*; import java.awt.*; public class UseMultipleFontsAndFontColors { public static void main(String[] args) throws Exception { //Create a Workbook instance Workbook wb = new Workbook(); //Get the first worksheet ...
A blog about Microsoft Office and PDF document development using .NET and Java.