Support cell object in the function 'sheet_add_aoa' #1276

Closed
hellosean1025 wants to merge 0 commits from master into master
hellosean1025 commented 2018-09-19 15:18:05 +00:00 (Migrated from github.com)

Support cell object , make js-xlsx easier to use.

describe('support object cell', function() {
  var data = require('./').utils.sheet_add_aoa (null, [
    ['url', 'name', 'id'],
    [
      {
        l: {
          Target: 'https://123.com',
        },
        v: 'url',
        t: 's',
      },
      'tom',
      'xxx'
    ],
  ]);
  it('base', function(){
    assert.deepEqual(data.A2,  { l: { Target: 'https://123.com' },
    v: 'url',
    t: 's' })
  })
})


Support cell object , make js-xlsx easier to use. ```js describe('support object cell', function() { var data = require('./').utils.sheet_add_aoa (null, [ ['url', 'name', 'id'], [ { l: { Target: 'https://123.com', }, v: 'url', t: 's', }, 'tom', 'xxx' ], ]); it('base', function(){ assert.deepEqual(data.A2, { l: { Target: 'https://123.com' }, v: 'url', t: 's' }) }) }) ```
SheetJSDev commented 2018-09-19 16:37:08 +00:00 (Migrated from github.com)

We made a similar fix to sheet_add_json but not to sheet_add_aoa. There are some issues like whitespace but we can fix it up and push an amended commit.

We made a similar fix to [`sheet_add_json`](https://github.com/SheetJS/js-xlsx/blob/master/bits/90_utils.js#L208) but not to `sheet_add_aoa`. There are some issues like whitespace but we can fix it up and push an amended commit.
hellosean1025 commented 2018-09-20 03:42:28 +00:00 (Migrated from github.com)

Ok.

Ok.

Pull request closed

Sign in to join this conversation.
No description provided.