title: Closed XML Report, horizontal and vertical table
body: <p>I found horizontal table example here: <a href="https://closedxml.github.io/ClosedXML.Report/docs/en/Flat-tables.html" rel="nofollow noreferrer">https://closedxml.github.io/ClosedXML.Report/docs/en/Flat-tables.html</a></p>
  
  <p>But data was arranged in a way that every entry on a list was a row and each row had array and that array was this dynamic length horizontal element. The problem is that my data structure is a little bit different, essentialy its list of columns. Its list of objects that have header and list of objects that are column data. Im not sure how to make template so it will iterate horizontally through entities and then for each of them vertically through subentities.</p>
  
  <p>Thats the main problem. Additionaly there is still another issue. Sub entities consists of name and quantity. Every parent entity has the same list of names in subentity, just diffrent quantities.</p>
  
  <p>To visualize it, lets say i have list of orders where every order is separate column and they consists of the same items just with diffrent quantities.</p>
  
  <p>Order structure:</p>
  
  <pre><code>class Order
    {
       public string OrderNumber{ get; set; }
       public IEnumerable&lt;ProductWithQuantity&gt; ProductsWithQuantities{ get; set; }
    }
  
  class ProductWithQuantity
    {
       public string ProductName{ get; set; }
       public int Quantity{ get; set; }
    }
  </code></pre>
  
  <p>I want to pass <code>IEnumerable&lt;Order&gt;</code> and using template generate excel like this:</p>
  
  <p><a href="https://i.stack.imgur.com/QK6oq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QK6oq.png" alt="enter image description here"></a></p>