title: Angular 7 - download incoming file from server
body: <p>I am sending a post request to my back end to receive an excell file. I can see in postman that my backend is sending the excell, but in angular I cannot download it. any ideas?
  here is my html code:</p>
  
  <pre><code>&lt;button (click)="excell()"&gt;Export Excell&lt;/button&gt; 
  </code></pre>
  
  <p>here is my service class:</p>
  
  <pre><code>export class HomeComponent implements OnInit {
  
  
  
    constructor(private data: DataService , private formBuilder: FormBuilder ) { }
  
    ngOnInit()  {
  
      }
  
      excell(){this.data.excell() 
      console.log("sent")}
  
  
  
  }
  </code></pre>
  
  <p>and here is my data class method for requesting to backend:</p>
  
  <pre><code>excell() {
      const headers = new HttpHeaders();
      console.log("sentin")
      headers.set('Content-Type', 'application/json; charset=utf-8');
      return this.http.post(this.baseUrl + '/Excel', { headers: headers })
    }
  </code></pre>