Does someone know how would I override webform_results_download to change the headers in my downloaded excel file?

I would like to have the headers for some of the columns to be different than what is displayed in the Webform form input labels.

So for example I have a select field with a label saying "Please check the following box if you are a permanent resident of California" and this label is what is getting put into header for this field in the downloaded webforms results excel spreadsheet. I'd like to change this to a header of "CA Perm Res", but I can't change text of the webform select label.

Thanks for your help,
Greg

Comments

gmercer’s picture

Did anyone have an answer for this one?

kulfi’s picture

I think my question is related - What is the webform_get_submission() equivalent for D5? I think this function only exists in D6?

quicksketch’s picture

gmercer, this currently is not possible in Webform, as the CSV download does not run through the theme system (though it really ought to).

ñull’s picture

Category: support » feature

Please let CSV download run through the theme system. While someone is coding that anyhow, what about adding another option? Questionairs are often used to do statistics isn't it? So why not add an option that you can work with the values (numbers) in select boxes instead of the descriptions? I was really disappointed to see that I now have to write some spreadsheet formulas to translate the descriptions back to values, while I could have them straight away from the form....

quicksketch’s picture

Title: How would I override webform_results_download to change the headers in my downloaded excel file? » Run CSV downloads through theme functions
Version: 5.x-2.1.3 »
liam morland’s picture

Version: » 7.x-4.x-dev

I really like the idea of using theme functions to make the download format easily modifiable. Another possible solution is available in Webform 4: #1464988: Export field_key instead of labels.

danchadwick’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Given the form keys noted in #4 and the lack of activity, I'm closing this. If there is still strong demand, please re-open.