Save HTML Table as CSV

This script will search the table on the page, format all rows/cells into a CSV formatted string and download it as CSV file. The file is formatted with semicolon as delimiter and all columns are wrapped in double quotes.
In my test, the file can be opened correctly in Excel (v2011, macOS).

Date Title Payment Method Amount
2007-06-22ToolsCash15.00
2008-03-27Bottle of winePayPal12.00
2009-07-04Trip to Las VegasCash500.00
2010-12-07RepairsCredit Card1050.43
2011-05-01Cinema TicketsCredit Card35.00
2017-01-08Special char test!"'§$%&;/\-_=?0€$¥