Home > Net >  Create a CSV table from a JSON file with a BOM marker in a Logic App
Create a CSV table from a JSON file with a BOM marker in a Logic App

Time:02-17

I'm trying to create a CSV table which has emoji's in it and send it as an attachment via logic app. So far, my app creates the JSON with the emoji's in it fine, and it looks as though the input going into the Create CSV Table action is also fine. But when I download the CSV created from my email, the emoji's are in gibberish and I realise that is because the CSV has been created without a BOM marker.

Any ideas how I can fix this? I've already tried the below solution but I don't think it works because of the conversion from CSV into bytes required to attach a file to an email.

https://techcommunity.microsoft.com/t5/integrations-on-azure-blog/create-csv-files-with-bom-marker-in-logic-app/ba-p/2919113

enter image description here

enter image description here

enter image description here

enter image description here

CodePudding user response:

One of the workaround is to transform the downloaded csv file. In order to print the emojis to the csv file follow the below steps

  1. Open Microsoft Excel.

  2. Navigate to Data >> Get External Data >> From Text.

    enter image description here

  3. Add the location of the CSV file, that you want to import and click Transform Data. make sure you choose the file Origin to 65001: Unicode (UTF-8) and Delimiter to comma.

    enter image description here

  4. Then the file will open in a Power Query Editor.

  5. Navigate to Home >> Close and Load.

    enter image description here

  6. Now you can see the pictures getting inserted to your file.

    Before:-

    enter image description here

    After:-

    enter image description here

  • Related