Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

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.

Table of Contents

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 password 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.

What is Apache POI

Apache POI, a project run by the Apache Software Foundation, and previously a sub-project of the Jakarta Project, provides pure Java libraries for reading and writing files in Microsoft Office formats, such as Word, PowerPoint and Excel
Click Here To Know More

List Of Steps

References

  • https://poi.apache.org
  • https://docs.mulesoft.com/general/

Code

Download Complete code from here

Bonus Tips

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.

The post How To Create a Password Protected Excel Using MuleSoft first appeared on Ravi Singh Blog.



This post first appeared on Ravisinghblog.in, please read the originial post: here

Share the post

How To Create a Password Protected Excel Using MuleSoft

×

Subscribe to Ravisinghblog.in

Get updates delivered right to your inbox!

Thank you for your subscription

×