Well, I've tried a code similar to this and seems to be working fine here. IW is 12.0.8 (the default that comes with XE), because that is what I have installed, but I imagine it won't have broke from 12.0 to 12.2 (maybe I am being naive...)
About the mime file, you should specify one or at least make sure you use the same file format everywhere. In the example I tried here, when I click "Open" in ie, I get a warning form Excel: "The file is not in the file format specified".(but if I click ok, the file opens fine).
You need to synchronize 3 different places:
1) The file format FlexCel itself is generating. When you save to a file, FlexCel knows what you want to save from the extension, so if you save as "something.xls", FlexCel will generate an xls file, and if you save as "Something.xlsx", then FlexCel will generate an xlsx file.
But, if you are saving to a stream as in this case, FlexCel can't guess what format you want. So you need to explicitly say it in the XlsxAdapter "SaveFormat" property.
In the object inspector for the XlsxAdapters, look at the "SaveFormat" property and set it to xls or xlsx as you want. Note that if you leave the default (auto) streams will be saved as xlsx.
2)The file format you send to the browser must be the same as 1). In your case, you are doing:
WebApplication.SendStream(MemStream,true,'','Strat_Units.xls'); //save as an attachment
But if you left the XlsxAdapter.SaveFormat = snAuto, then the file will be actually xlsx and Excel 2010 will complain.
So you either set the SaveFormat = snXls, or call:
WebApplication.SendStream(MemStream,true,'','Strat_Units.xlsx'); //save as an attachment
Probably as the templates are xls, the best is to keep the file format xls, to avoid a conversion. So I would change the SaveFormat to be xls.
3)In the line:
WebApplication.SendStream(MemStream,true,'','Strat_Units.xls'); //save as an attachment
You can specify the mime type, like:
WebApplication.SendStream(MemStream,true,'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','Strat_Units.xlsx'); //save as an attachment
But it looks like indeed, IW handles this automatically, so probably the best is to keep the mime empty. Because if you change it, you will have to set the correct one depending if it is xls, xlsx or xlsm.
So well, please try it with SaveMode= snXls and see if it works better. If not, we will have to see that generated file before streaming to locate the problem.