{"id":25021734,"url":"https://github.com/mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete","last_synced_at":"2026-04-11T05:06:41.022Z","repository":{"id":169811509,"uuid":"645875521","full_name":"mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete","owner":"mushfiqur-rahman","description":"Google Spreadsheet to REST API to Python Django to React MUI Autocomplete","archived":false,"fork":false,"pushed_at":"2023-05-28T17:14:55.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-05T13:41:58.486Z","etag":null,"topics":["django","django-rest-framework","google-spreadsheet-api","mui-autocomplete","mui-material","mushfiqfeed","python","reactjs","rest-api","spreadsheet","vitejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mushfiqur-rahman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-26T16:38:17.000Z","updated_at":"2024-03-01T14:57:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"098555a5-c562-44c0-9df2-52ac4f20001d","html_url":"https://github.com/mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete","commit_stats":null,"previous_names":["mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mushfiqur-rahman","download_url":"https://codeload.github.com/mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314124,"owners_count":20757457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-rest-framework","google-spreadsheet-api","mui-autocomplete","mui-material","mushfiqfeed","python","reactjs","rest-api","spreadsheet","vitejs"],"created_at":"2025-02-05T13:36:24.471Z","updated_at":"2025-12-30T19:56:27.897Z","avatar_url":"https://github.com/mushfiqur-rahman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MUI Autocomplete using Django Rest API and Google Spreadsheet API\n\nI made this task(this is not project) for learning purpose where I converted Google Spreadsheed to REST API, then converted data formation using python django and after that I used it on React MUI autocomplete.\n\n\n### Tutorial\n\n[![YouTube Tutorial](https://img.youtube.com/vi/XRjLqDjeHjY/0.jpg)](https://www.youtube.com/watch?v=XRjLqDjeHjY)\n\n____\n\n\n [Google Spreadsheet Link](https://docs.google.com/spreadsheets/d/1RbnStR4xLjHkSoDsGCO7xHwCl3WhASFZDHGQIY8OdvQ/edit?usp=sharing)\n\n\nWhich `code` I have use at `apps script` of Google spreadsheet:\n\n__Apps Script__\n\n\u003e If you use below code then your data will show\n\n```javascript\nfunction doGet(req) {\n  var doc = SpreadsheetApp.getActiveSpreadsheet();\n  var sheet = doc.getSheetByName('q3');\n  var values = sheet.getDataRange().getValues();\n\n\n  var output = [];\n  for(var i = 0; i\u003c values.length; i++) {\n    var row = {};\n    row['Item ID '] = values[i][0];\n    row['Item'] = values[i][1];\n    row['tag 1'] = values[i][2];\n    row['tag 2'] = values[i][3];\n    row['tag 3'] = values[i][4];\n\n    output.push(row);\n  }\n\n  return ContentService.createTextOutput(JSON.stringify(output)).setMimeType(ContentService.MimeType.JSON);\n}\n```\n__output__\n\n```json\n[\n  {\n    \"Item ID \": \"Item ID\",\n    \"Item\": \"Item\",\n    \"tag 1\": \"tag 1\",\n    \"tag 2\": \"tag 2\",\n    \"tag 3\": \"tag 3\"\n  },\n  {\n    \"Item ID \": 30003,\n    \"Item\": \"Thesis\",\n    \"tag 1\": 101,\n    \"tag 2\": 103,\n    \"tag 3\": \"\"\n  },\n  {\n    \"Item ID \": 30004,\n    \"Item\": \"Meditation\",\n    \"tag 1\": 110,\n    \"tag 2\": 101,\n    \"tag 3\": 111\n  },\n  {\n    \"Item ID \": 30005,\n    \"Item\": \"Helping\",\n    \"tag 1\": 403,\n    \"tag 2\": 203,\n    \"tag 3\": 120\n  },\n  {\n    \"Item ID \": 200669,\n    \"Item\": \"YouTube\",\n    \"tag 1\": 542,\n    \"tag 2\": 87,\n    \"tag 3\": \"\"\n  }\n]\n\n```\n\u003e here is the problem is spreadheet all columns has not values. For this problem I used below code.\n\n\n```javascript\nfunction doGet(req) {\n  var doc = SpreadsheetApp.getActiveSpreadsheet();\n  var sheet = doc.getSheetByName('q3');\n  var values = sheet.getDataRange().getValues();\n\n  var studentQ3 = values.map(function(row){\n    var formattedRow = [];\n    for( var i =0; i\u003crow.length; i++){\n      var cellValue = row[i].toString().trim();\n      if (cellValue !== \"\"){\n        formattedRow.push(cellValue);\n      }\n    }\n    return formattedRow;\n  });\n\n  return ContentService.createTextOutput(JSON.stringify(studentQ3)).setMimeType(ContentService.MimeType.JSON);\n}\n```\nOutput:\n```json\n[\n  [\n    \"Item ID\",\n    \"Item\",\n    \"tag 1\",\n    \"tag 2\",\n    \"tag 3\"\n  ],\n  [\n    \"1001\",\n    \"Malaysia\",\n    \"101\",\n    \"102\",\n    \"103\"\n  ],\n  [\n    \"1002\",\n    \"Turkey\",\n    \"201\",\n    \"202\",\n    \"203\"\n  ],\n  [\n    \"1003\",\n    \"Bangladesh\",\n    \"301\",\n    \"302\",\n    \"303\"\n  ]\n]\n```\n___\n\n__For frontend setup__\n\n```bash script\n$ git clone https://github.com/mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete.git\n```\n```bash script\n$ cd frontend\n```\n```bash script\n$ frontent\u003e npm install \u0026 npm run dev\n```\nNow open your browser \u0026 got to the url\n```url\n http://127.0.0.1:5173/\n```\n___\n\n__For Backend setup__\n```bash script\n$ cd backend\n```\n```bash script\n$ backend \u003e py -m venv venv\n```\n```bash script\n$ backend \u003e venv\\scripts\\activate\n```\n```bash script\n$ backend \u003e venv\\scripts\\activate\n```\n\n```python\n(venv) PS D:\\backend\u003e python -m pip install -r requirements.txt\n```\n```bash script\n(venv) PS D:\\backend\u003e py manage.py migrate\n```\n\n\n```bash script\n(venv) PS D:\\backend\u003e py manage.py runserver\n```\n\n### Student Needs API URL\n```\nhttp://127.0.0.1:8000/q1/\nhttp://127.0.0.1:8000/q2/\nhttp://127.0.0.1:8000/q3/\n```\n\n**Post URL**\n```\nhttp://127.0.0.1:8000/api/services/\n```\n\n\n### Material UI Autocomplete\n\n![mui autocomplete](https://github.com/mushfiqur-rahman/google_spreadhseetapi_mui_autocomplete/assets/26889268/5b477642-14d2-4f06-9263-9331539322d9)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmushfiqur-rahman%2Fgoogle_spreadhseetapi_mui_autocomplete/lists"}