My client is wanting to import an exported webform (MS Excel format) in to MS Access. They want to import the webform submission ID, but exporting the submission ID also exports $node->title and t('Submission Details'); and judging by the code extract below there is no way to change this.

  // Fill in the header for the submission information (if any).
  $header[2] = $header[1] = $header[0] = count($submission_information) ? array_fill(0, count($submission_information), '') : array();
  if (count($submission_information)) {
    $header[0][0] = $node->title;
    $header[1][0] = t('Submission Details');
    foreach (array_values($submission_information) as $column => $label) {
      $header[2][$column] = $label;
    }
  }

First off, it would be great to have an option to not export the node title and string "Submission Details", but would be even better if you could get rid of the two rows completely.

I think it would be difficult to stop the first 2 rows being generated because some contrib modules could be setting these values for custom components, but it's easy enough to destroy these rows.

if ($user_doesnt_want_the_header_rows) {
  $header = array_slice($header, 2);
}

Does this issue make sense? I'm kind of just rambling my thoughts, but I think it stands as a valid feature request.

Comments

KristineC’s picture

I'm looking for something similar, where the export will have the headers begin at row 1.

quicksketch’s picture

I agree that the first row is somewhat questionable, but the second row is heavily used when you have Grid or Select components. I explained what each row is used for at #1886842-2: First two lines empty on exported excel, which is a similar request.

DanChadwick’s picture

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