title: How to use c#.net EPPlus with Mono
body: <p>I've looked into ways of manipulating Excel files using c#.net without using the Excel interop and have come across EPPlus. It seems to work great on windows. But how can I get it to work in Mono (our server is a Linux server).</p>
  
  <p>This is the code I tried just to test (a simple .exe):</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using OfficeOpenXml;
  using OfficeOpenXml.Drawing;
  using OfficeOpenXml.Style;
  using System.IO;
  
  namespace ConsoleApp
  {
  class Program
  {
      static void Main(string[] args)
      {
  
          ExcelPackage excelPackage = new ExcelPackage();
          ExcelWorksheet excelWorksheet = CreateSheet(excelPackage, "TestSheet");
  
          Byte[] bin = excelPackage.GetAsByteArray();
          string file = Directory.GetCurrentDirectory() + @"\Test.xlsx";
          File.WriteAllBytes(file, bin);
      }
  }
  }
  </code></pre>
  
  <p>But of course when I try to run it from the Linux server it crashes and says "Console App has stopped working". Is there anything obvious I'm doing wrong??</p>
  
  <p>Thanks a lot!</p>