0

Filehelpers ExcelStorage has a property public string TemplateFile { get; set; }

For that reason I have to keep my template file in the program directory (bin). But if I want to use my template file as a embedded resource is there any way I can still use that as a template in ExcelStorage ?

svick
  • 236,525
  • 50
  • 385
  • 514
Sreginogemoh
  • 1,309
  • 3
  • 10
  • 12

1 Answers1

0

The TemplateFile property is for specifying the .xls file to use when writing data, not for the record class.

However, you ought to be able to use Runtime Record Classes. Something like:

// myTemplate is the extracted resource as a string
string mClass = myTemplate;
Type t = ClassBuilder.ClassFromString(mClass); 
var storage = new ExcelStorage(t);
//etc.
shamp00
  • 11,106
  • 4
  • 38
  • 81