1

该文件有一个示例下拉列表,其中数据来自硬编码的 json 格式,如下所示。

   var data = [
        {
        "department": "IT",
        "subject": [
            {
            "title": "Programmer",
            "services": [
                {
                "name": "example1"},
            {
                "name": "example2"}
                          ]

            },
        {
            "title": "Solutions Architect",
         "services": [
                {
                "name": "example3"},
            {
                "name": "example4"}
                          ]
},
        {
            "title": "Database Developer"}
        ]},
    {
        "department": "Accounting",
        "subject": [
            {
            "title": "Accountant"},
        {
            "title": "Payroll Officer"},
        {
            "title": "Accounts Clerk"},
        {
            "title": "Analyst"},
        {
            "title": "Financial Controller"}
        ]},
    {
        "department": "HR",
        "subject": [
            {
            "title": "Recruitment Consultant"},
        {
            "title": "Change Management"},
        {
            "title": "Industrial Relations"}
        ]},
    {
        "department": "Marketing",
        "subject": [
            {
            "title": "Market Researcher"},
        {
            "title": "Marketing Manager"},
        {
            "title": "Marketing Co-ordinator"}
        ]}
    ]

是否可以使用谷歌电子表格中的数据创建相同类型的下拉列表?如果是这样,电子表格所需的数据格式是什么?

编辑:是否可以使用数据源创建相同的下拉菜单

var query = new google.visualization.Query("http://spreadsheets.google.com/tq?key=0AozvCNI02VmpdDBKYUhRdVVhb2xGel91c2FkV1daYkE&single=true&gid=0&pub=1");
       query.send(handleQueryResponse);
       }
       function handleQueryResponse(response) {
          var data = response.getDataTable();

来自这个电子表格

4

0 回答 0