In this video I will be showing how to export an HTML table to a CSV Excel file that downloads automatically using vanilla JavaScript - no libraries are required!
This is relatively simple to do and in this example we'll be using a class with a constructor, public method, private method and static method. This code produces a fully valid CSV file and has the option to include or exclude headers in the output.