issue #23796 - csv export from gridbox

isaacs does it this way, so you're in good company, but we've been putting the commas at the end of the line, not at the beginning of the next one, for variable definitions.