Skip to content

Latest commit

 

History

History
92 lines (80 loc) · 1.93 KB

includefirstcolumninexport.md

File metadata and controls

92 lines (80 loc) · 1.93 KB

Include first column in export

Include the first column of each row as a distinct element in addition to it being used for the name of the row element.

By default, the first column of a row is not exported as a distinct XML element or JSON value as it is used to name the row element. Enabling this will cause the first column to be exported as both the name (or key) of the row's element as well as its own distinct element like the other columns in a row.

JSON Notes:

Some JSON settings will override this setting and always include the first column, specifically Nested Elements and Export sheet arrays.

Example:

Sheet name: Seasons

Name Temperature
Spring Warm
Summer Hot
Autumn Cool
Winter Cold

Default Output:

JSON:

{
  "Seasons": {
    "Spring": {
      "Temperature": "Warm"
    },
    "Summer": {
      "Temperature": "Hot"
    },
    "Autumn": {
      "Temperature": "Cool"
    },
    "Winter": {
      "Temperature": "Cold"
    }
  }
}

XML:

<data>
  <Seasons>
    <Spring Temperature="Warm"/>
    <Summer Temperature="Hot"/>
    <Autumn Temperature="Cool"/>
    <Winter Temperature="Cold"/>
  </Seasons>
</data>

Include First Column Output:

JSON:

{
  "Seasons": {
    "Spring": {
      "Name": "Spring",
      "Temperature": "Warm"
    },
    "Summer": {
      "Name": "Summer",
      "Temperature": "Hot"
    },
    "Autumn": {
      "Name": "Autumn",
      "Temperature": "Cool"
    },
    "Winter": {
      "Name": "Winter",
      "Temperature": "Cold"
    }
  }
}

XML:

<data>
  <Seasons>
    <Spring Name="Spring" Temperature="Warm"/>
    <Summer Name="Summer" Temperature="Hot"/>
    <Fall Name="Autumn" Temperature="Cool"/>
    <Winter Name="Winter" Temperature="Cold"/>
  </Seasons>
</data>