Google Spreadsheet To object

  • 状态: Pending
  • 奖金: $11
  • 参赛作品已收到: 0

竞赛简介

We need two algorithms.

- The first one converts a google spreadsheet into a javascript object.
- The second one parses an javascript Object to cells.

The implementation must be develop on Google App Script inside a google spreadsheet.

The object structure can have nested levels. Example:

- Example 1:
[{
type: 1,
id: 747,
name: Chuck,
lastName: Norris,
contact info: {
email: chuck@[login to view URL],
phone: 97784876876,
address: {
street: Av siempre viva,
number: 123,
city: Springfield
}
},
alternative contact info: {
email: cnorris@[login to view URL],
phone: 887678899
}
}]

- Example 2:
[
{
type: Car,
doors: 5,
motor: {
param1:AC,
param2: 123
},
color: {
interior: blue,
exterior: {
wheels: yellow,
bumper: {
front: green,
back: yellow
},
mirror: white,
accesory: grey
}
}
},{
type: Truck,
doors: 2,
motor: {
param1:JD
},
color: {
interior: white,
exterior: {
wheels: black,
bumper: {
front: red,
back: blue
},
mirror: blue,
accesory: grey
}
}
}
]

This objects are represented in a spreadsheet where each level of the object represent a header row. See an example on https://docs.google.com/spreadsheets/d/1hestx1gqtH99cbm-C72ZAMj8gHZQ-ehD12RuObjo6rU/edit#gid=0 to see an example sheet. There can be n levels of headers/keys.

In the example sheet you can see some frozen rows that represents the headers levels. If you want you can toggle/reorder the header rows, but not the data rows. Also if you want, you can combine headers with same name (see example 3 that has reordered headers and combined). Last, you can't reorder the columns to make the object from the spreadsheet, but to make a sheet from an object, the order comes from the object.

As you can see, if a cell is empty, there is no value for that key present on the object (see param2 on example 2 or website on example 1). For this case when converting from object to sheet, the result must be the same, for a missing key in one of the objects, the correspoding cell must get empty.

您还可能感兴趣

公共说明面板

  • nsanz
    竞赛主办者
    • 9 小时 之前

    you didn't accomplish the basic requirement that it must work for n headers. When you talk me about your work, you told me that n headers wasn't considered and was hard coded de number of headers, because it was imposible to do for n headers without knowing the headers before. As no one show me a solution, I did it mysefl.

    • 9 小时 之前
  • juvigy
    juvigy
    • 5 天 之前

    My solution was working 100% according to your requirements. (There was small misunderstanding in the beginning which was resolved). You haven't seen or tested my solution because it was never chosen.

    • 5 天 之前
  • nsanz
    竞赛主办者
    • 6 天 之前

    the other I don't know what happend

    • 6 天 之前
  • nsanz
    竞赛主办者
    • 6 天 之前

    *wasn't

    • 6 天 之前
  • nsanz
    竞赛主办者
    • 6 天 之前

    It wasent a fake, your solution was reported because it didn't solve the requeriments

    • 6 天 之前
  • juvigy
    juvigy
    • 6 天 之前

    There were at least 2 working solutions here including mine. I see now that all have been withdrawn as i did. This contest is a fake, don't waste your time!

    • 6 天 之前
  • TheAlexandru
    TheAlexandru
    • 3 周 之前

    I will do it for a bigger t #increaseprize

    • 3 周 之前
    1. nsanz
      竞赛主办者
      • 3 周 之前

      $$?

      • 3 周 之前

显示更多评论

如何以竞赛开始

  • 发布您的竞赛

    发起您的竞赛 快速简单

  • 获取众多参赛作品

    获取大量参赛作品 来自世界各地

  • 悬赏最佳参赛作品

    悬赏最佳参赛作品 下载文件-简单!

立即发布竞赛 或者立即加入我们!