I assume you know how to create a regular CSV with TO_CSV and how C strings work.

First, you construct your string with sprintf or strf, but with semicolons instead of commas as separators. Each var will have periods for decimal places.

Next, you iterate through each character of your string and replace each '.' with ','.

Finally, you push the string to print(TO_CSV,...).