No, they are not the same.
Formats like CSV or .txt are just data. They have no ability to store meta-information at all.
.xls and .doc, etc have the ability to store and display style rules. You can export to a speadsheet file for sure, in higher level languages like .Net and java. I doubt you'll be able to do that in javascript, I would expect it to require a post to the server, but I may be wrong.
Even if you could save the data to .xls, adding in the HTMl colours would be a bit of work due to how .xls files are written.