javascript - UI-Grid more than one field per column -
i need import excel sheet ui-grid using js-xls in same column retrieve data database. example, 1 of columns defined as:
{ field: 'employee_id', displayname: 'id', width: "*"}
from sheet, column join produces json object named "person number". need "employee_id" , "person number" on same column. like:
{ field: 'employee_id + person number', displayname: 'id', width: "*"}
how can achieve this?
i found way deal this. after retrieving data excel sheet, made loop change key names of objects match ones retrieve database. this:
data[i].employee_id = data[i]['person number']; delete data[i]['person number'];
that way, have same structure , make sure import work column ordering in sheet.
thanks s. baggy , tylerwal commenting!
Comments
Post a Comment