title: Azure logic app returns file content as encoded string
body: <p><strong>I need to pass one Excel file saved in one drive to azure function app using azure logic app</strong></p>
  
  <p><a href="https://i.stack.imgur.com/LHvkw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LHvkw.png" alt="after trigger logic app it shows like this"></a></p>
  
  <p><em>I created my function app for read excel file it works fine when I send excel file via postman in form-data type</em></p>
  
  <p>I tried with 
  <strong>base64</strong> <strong>, utf-8</strong> <strong>, utf-16</strong> 
  encoding and decoding ways to create excel file inside azure function a
  by referring some StackOverflow questions and documentations but I couldn't</p>
  
  <p><strong>when i use below code</strong></p>
  
  <pre><code>    byte[] fileinbytes = Convert.FromBase64String(file);
      File.WriteAllBytes("abcd.xlsx", fileinbytes);
  </code></pre>
  
  <p><strong>it throws exception</strong></p>
  
  <blockquote>
    <p>The input is not a valid Base-64 string as it contains a non-base 64
    character, more than two padding characters, or an illegal character
    among the padding characters.</p>
  </blockquote>
  
  <p><strong>problem is how can decode these string in to file inside my function app or how to read these encoded string as excel file</strong></p>
  
  <p>Thank you</p>