src/sheets.js
function sheetToTable(sheet) {
  if (sheet.data.length === 0 || sheet.data[0].rowData === undefined) {
    return {
      title: sheet.properties.title,
      headers: [],
      formats: [],
      rows: []
    };
  }
  const gridData = sheet.data[0]; // first (unique) range
  const headers = gridData.rowData[0].values // first row (headers)
    .map(col => formattedValue(col));

  const otherRows = gridData.rowData.slice(1);

  const values =
    otherRows.length > 0
      ? otherRows[0].values
      : new Array(headers.length).fill({});

  return {
    title: sheet.properties.title,
    headers: headers,
    formats: values.map(value => effectiveFormat(value)),
    rows: otherRows.map(row =>
      zipObject(
        headers,
        row.values.map(value => ({
          value: effectiveValue(value),
          stringValue: formattedValue(value)
        }))
      )
    )
  };
}
function sheetToTable(sheet) {
  if (sheet.data.length === 0 || sheet.data[0].rowData === undefined) {
    return {
      title: sheet.properties.title,
      headers: [],
      formats: [],
      rows: []
    };
  }
  const gridData = sheet.data[0]; // first (unique) range
  const headers = gridData.rowData[0].values // first row (headers)
    .map(col => formattedValue(col));

  const otherRows = gridData.rowData.slice(1);

  const values =
    otherRows.length > 0
      ? otherRows[0].values
      : new Array(headers.length).fill({});

  return {
    title: sheet.properties.title,
    headers: headers,
    formats: values.map(value => effectiveFormat(value)),
    rows: otherRows.map(row =>
      zipObject(
        headers,
        row.values.map(value => ({
          value: effectiveValue(value),
          stringValue: formattedValue(value)
        }))
      )
    )
  };
}
function sheetToTable ( sheet ) { if ( sheet . data . length === 0 || sheet . data [ 0 ] . rowData === undefined ) { return { title : sheet . properties . title , headers : [ ] , formats : [ ] , rows : [ ] } ; } const gridData = sheet . data [ 0 ] ; // first (unique) range const headers = gridData . rowData [ 0 ] . values // first row (headers) . map ( col => formattedValue ( col ) ) ; const otherRows = gridData . rowData . slice ( 1 ) ; const values = otherRows . length > 0 ? otherRows [ 0 ] . values : new Array ( headers . length ) . fill ( { } ) ; return { title : sheet . properties . title , headers : headers , formats : values . map ( value => effectiveFormat ( value ) ) , rows : otherRows . map ( row => zipObject ( headers , row . values . map ( value => ( { value : effectiveValue ( value ) , stringValue : formattedValue ( value ) } ) ) ) ) } ; }
Converter from google sheet format to node-sheets format
Converter from google sheet format to node - sheets format