How To Create a Password Protected Excel Using MuleSoft

Creating an excel output is quite common in MuleSoft. But sometime we need to assign a password protection to the excel sheet. In this post, I am going to explain how to achieve this in Mulesoft.

How to create excel file using MuleSoft

What is the Problem?

MuleSoft provides a way to transform the output to css or excel but how to make an excel file password protected.

Solution

Remember to store sensitive information, we protect excel sheet. So how do we create a password protected file? There is no inbuilt option in MuleSoft. There are various ways but I am going to suggest using Java class to achieve this.

We are going to use Apache POI to access, create excel sheet and then protect it with a password.

We will create a Java class for it. Remember once you protect an excel file with password, you cannot get the original payload using MuleSoft without decrypting it back.

List Of Steps

References

Code

Complete excel flow

Download Complete code from here

If you are using Cloudhub, you may use /tmp location to store unprotected file temporarily or if on premise, select folder path from local file system.

Please Share this post with your friends community.

Leave a Comment

>