alot of text: but the only important sentence is this:
Cannot create excel, because the inputobject isn't a subclass of configured. Expect: MyFirstModule.Hero Retrieved: MyFirstModule.HeroDoc
meaning that you are using the wrong (list of) objects.
In addition to what Leon mentioned:
Self explanatory error when you read between lines
Cannot create excel, because the inputobject isn't a subclass of configured. Expect: MyFirstModule.Hero Retrieved: MyFirstModule.HeroDoc
You have configured the Excel template to accept Hero entity. But you are passing HeroDoc entity while creating the Excel.
But HeroDoc isnt a Subclass of Hero. So application is throwing error.
Either change the excel template to use HeroDoc or pass Hero object or you can also make HeroDoc a specialized class of Hero.