title: Open file directly from SharePoint path with CSOM
body: <p>I have a SharePoint server and I want to open files <strong>directly</strong> from the Server with SharePoint CSOM.</p>
  
  <p>User clicks button --> the file (Excel, Word, ...) opens at the client machine with the standard software.</p>
  
  <p>Directly means, that if I change something to the file and click save, that the file is directly saved on the SharePoint server (or if I click e.g. 'Save as' in Excel the suggested path is '<a href="https://sharpoint.url.com/folder" rel="nofollow noreferrer">https://sharpoint.url.com/folder</a>').</p>
  
  <p>Actually I have:</p>
  
  <pre><code>using Microsoft.SharePoint.Client;
  
  var clientContext = new ClientContext("https://sharpoint.url.com");
  string relativePath = "/folder/file.xls";
  clientContext.Credentials = CredentialCache.DefaultCredentials;
  var file = clientContext.Web.GetFileByServerRelativeUrl(relativePath);
  
  clientContext.Load(file);
  clientContext.ExecuteQuery();
  </code></pre>
  
  <p>What do I have to do now, if I want to open the file directly (no download)?</p>