Skip to content

Instantly share code, notes, and snippets.

@eternalharvest
Created August 25, 2018 07:32
Show Gist options
  • Save eternalharvest/79de9726949bcaabc5628d7c76e68492 to your computer and use it in GitHub Desktop.
Save eternalharvest/79de9726949bcaabc5628d7c76e68492 to your computer and use it in GitHub Desktop.
Dictionary<string, object> data_alex = new Dictionary<string, object>();
data_alex["NAME"] = "Alex";
data_alex["GENDER"] = "Male";
data_alex["BIRTH"] = new DateTime(1989, 12, 3).Date;
data_alex["TODAY"] = DateTime.Today.Date;
data_alex["LEVEL"] = 99;
Dictionary<string, object> data_steve = new Dictionary<string, object>();
data_steve["NAME"] = "Steve";
data_steve["GENDER"] = "Male";
data_steve["BIRTH"] = new DateTime(1990, 8, 8).Date;
data_steve["TODAY"] = DateTime.Today.Date;
data_steve["LEVEL"] = 99;
using (ExcelTemplate template = new ExcelTemplate(@"C:\Users\takuya\Desktop\template.xlsx"))
{
template.render(@"C: \Users\takuya\Desktop\alex.xlsx", data_alex);
template.render(@"C: \Users\takuya\Desktop\steve.xlsx", data_steve);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment