When exporting results to Excel/CSV, matrix components that have empty values return a single empty cell rather than empty cells for each matrix column. This throws off the column alignment of the exported results.

CommentFileSizeAuthor
#2 webform_matrix_component-2573445.patch893 bytessignaltrace

Comments

signaltrace created an issue. See original summary.

signaltrace’s picture

StatusFileSize
new893 bytes

Rather than returning an empty array, return an array with a number of empty values equal to the number of matrix component columns.

signaltrace’s picture

Status: Active » Needs review
signaltrace’s picture

Assigned: signaltrace » Unassigned
roflcopterDorrie’s picture

#2 worked for me, +1 for RTBC

chetan-singhal’s picture

Status: Needs review » Closed (fixed)
carroll_webprog’s picture

Hello, I was still running into this problem even after the commit, and found that one line was missed in the commit, around line 689:
+ $size = !empty($component['extra']['matrix_col']) ? $component['extra']['matrix_col'] : 1;
Without this line the commit doesn't work. It is easy enough just to add the line, but I thought I should let drupal_rocker know.

Thanks so much for the work on this module, I use it all the time.

Surmont’s picture

Ran into this issue too, thanks to @ldwyer for providing that line of code as a fix!
Shouldn't this be patched and opened again since the issue still occurs?