How to Color Excel File Using Mulesoft
This article covers the step-by-step guide to color excel files using Mulesoft.
Join the DZone community and get the full member experience.
Join For FreeUse-Case :
1. Payroll System: There are two payroll systems for different regions and I need to aggregate the data in the excel file in the particular folder in the SFTP location.
2. I need to color using MuleSoft there is a scenario in which the excel file should be colored according to some conditions. Suppose, Termination Date and Effective Date in that excel for a particular condition I have to fill the color in Excel file.
3. For this, I used Java Apache POI Framework and Invoke static connector.
Configuration of invoking static.
4. Add the below dependency in your pom.xml.
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
5. There are some conditions for the particular color I need to fill in the excel file for the particular column like Termination Date and Effective Date. Suppose if TD and ED match then yellow color, if TD and ED are different then green color and TD is greater than ED then blue color in the excel for the folder which is present in SFTP location.
6. For the particular condition I am writing the code in java.
Conclusion:
By using Java Apache POI we can able to do coloring in excel using MuleSoft.
Opinions expressed by DZone contributors are their own.
Comments