Trying to search for a way to send an HTML table to Excel, I came across this fiddle
window.open('data:application/vnd.ms-excel,' + $('#whatever').html());
I was surprised to find out it was just that simple and I was wondering if anyone could explain how this works. The documentation for window.open doesn't appear to list an explanation under msdn https://msdn.microsoft.com/en-us/library/windows/apps/hh453415.aspx or mozilla developer network https://developer.mozilla.org/en-US/docs/Web/API/Window/open
It could be that I'm not phrasing my question correctly that's preventing me from finding an answer, but I guess I'm just curious how I can utilize this in the future to export html to excel and other file formats or if I shouldn't touch it(for instance if it's something that was abandoned and should never be used)
I've also looked at several other posts such as JavaScript table export to excel and export to excel using javascript and though they may answer the questions, I'm asking specifically about what's happening in the above code because it's so simple and concise.