vc6 is so old it. It is not a compliant c++ compiler and you should not be using it if you are programming in c++ now.
Note that I simply supplied the VC6 for demonstration purposes. As you can see it works fine. I have not tested with later version of visual studio as I only have license for VC6 and normally use Qt exclusively.
There is no such thing as a Qt dll in this sense. You can make a dll from c++ code, and the compatibility, or otherwise, with excel etc will have little to do with Qt.
Qt actually supports three different library types, plugin, static and shared ( .dll on windows ). I'm using the latter but this should be clear from the keyword "lib" in the Qt project' .pro file.
In your case, the dll that 'isn't working' was built with minGW. Are you sure the def files are the same for vc6 and gcc?
I've attached both projects with full source code in the post, were you not able to open them? Please do and you'll see two identical .def files. Use the link I provided to see that MinGW also supports .def approach to export functions.