Skip to main content

I have a lot of JSON-responses that wraps an base64-encoded excelfile (response.json).

If I extract the data-part and try to decode it using BinaryDecoder (base64 to hex I guess). And then decode to ASCII, I get only a few chars that makes no sense.

 

If I use an online-service (https://www.base64decode.org/) and add the data-part of the JSON-file (JSON response -.....) I get a perfect excel-file.

 

I can't seem to figure out the part that the online-service performs and the part I can't make FME do.

 

Any help is appreciated.

 

I can get it to write a readable excel file using the following steps:

  • Use a BinaryDecoder to go from Base64 to Binary (fme-binary).
  • Use an AttributeFileWriter to write to a file, Target File Encoding = Binary (fme-binary).

Sample attached.

 


I can get it to write a readable excel file using the following steps:

  • Use a BinaryDecoder to go from Base64 to Binary (fme-binary).
  • Use an AttributeFileWriter to write to a file, Target File Encoding = Binary (fme-binary).

Sample attached.

 

Thank you. It works like a charm!


Reply