Variable names to excel or csv sheet

I need some help with getting a list of variable names from my game.
I would like to have it in a work sheet in 2 columns one for the variable ID and then next to it one for the variable name.
I do not need the value of the variables just the name and ID of the variables. I have been searching on the web and have found nothing. If there is some kind of script call that can help me out then that would be great.
Thank you in advance
As a quick solution, you could open the dev tools window (F8 or F12 during playtest), select the Console tab, copy this in, then press Enter:

$dataSystem.variables.map(function(s, n) { return n + "," + s; }).join("\n");
This will output a multi-line string to the Console tab: one line of variable_id, name for each variable. You can manually copy it from there.
As a quick solution, you could open the dev tools window (F8 or F12 during playtest), select the Console tab, copy this in, then press Enter:

$dataSystem.variables.map(function(s, n) { return n + "," + s; }).join("\n");

This will output a multi-line string to the Console tab: one line of variable_id, name for each variable. You can manually copy it from there.
Thank you, I appreciate it
This sorted it for me.

Original thread: https://forums.rpgmakerweb.com/threads/variable-names-to-excel-or-csv-sheet.163072/