CSV file from tag historian showing too many decimal points

That long string of digits is Java attempting to be polite and give you an as-exact-as-possible representation of the value as it can.
If you want to provide explicit formatting, you must do that yourself (by looping over the dataset and changing each float value to a string using your own formatting operation. system.dataset.toHTML doesn't offer you control over this.
You could do this with system.dataset.addColumn and system.dataset.filterColumn (to remove the now duplicate value columns). Or you could install Ignition Extensions and use system.dataset.map.

Or, you could write a script that does what system.dataset.datasetToHTML does, but better; it's not a super complicated bit of scripting.