Tag Archives: enumerate

Released in OfficeWriter 8.6.1 – IEnumerable Feature

In OfficeWriter 8.6.1, we added a new feature that may have been flying under your radar, and I wanted to let you in on the story of how it came about.

When I first arrived at SoftArtisans I went through training of our entire product line.  As I was reviewing the training material, I came across the ExcelWriter Template section. I saw how to add data markers to my spreadsheet, and it seemed intuitive, so I went ahead and tried it:


At that moment, I was thinking “This is pretty slick. Now, I can just pass things into the spreadsheet!”  I’m not the greatest at reading documentation; I just like to learn by doing, so I opened Visual Studio and started writing code:

class Expense


double Amount { get; set; }

string Description = "";

bool Approved { get { return (Amount > 1000); } }



for (int i=0; i<1000; i++)

expenses.Add(new Expense(i));


Looking good so far.  What I did next, however, was my downfall:

ExcelTemplate xlt = new ExcelTemplate();