testbeginer
testbeginer

Reputation: 11

Converting Excel to JSON using Dataweave in anypoint studio

Need to transform Excel to JSON using Dataweave in Anypoint Studio.

Mule Datamapper supports converting Excel files to JSON directly,where as in DataWeave it won't support Excel to JSON conversion.

In a blog i found that using POI libraries we can do this but it is a bit complex work.

Is there any alternative way to do this?

Upvotes: 0

Views: 3144

Answers (2)

Manik Magar
Manik Magar

Reputation: 1401

I don't think there is any Excel transformer in 3.7 unless you want to use DataMapper which is deprecated. Yes, some work but you can use Apache POI like below -

  1. Convert Excl to CSV using Java Transformer - I found this apache sample generic class here
  2. Now, Once you have the CSV, send that to DataWeave and do your CSV to JSON transformation.

Upvotes: 0

FerMelon
FerMelon

Reputation: 93

Excel (XLSX files) support for DataWeave (the data transformation processor) has been released with the new Anypoint Studio 6.1.2 version w/3.8.2 Runtime.

Please see how to use it here: Excel format in DataWeave

And the release notes below:
https://docs.mulesoft.com/release-notes/anypoint-studio-6.1-with-3.8.2-runtime-update-site-2-release-notes

Upvotes: 2

Related Questions