Data table component for displaying leaderboard in https://www.dhruvaiiitk.tech (Technical Fest website)
- Made use of the datatable api to create the dynamic table
- Styling via inbuilt bootstrap 5 plugin for datatable and basic css
- Converted google sheets data into JSON format via opensheet api
- Create your table in google sheets, Sheet1 (if any other sheet please see [Deployment Notes]) (with the first row dedicated to specifying the column headings followed by actual data)
-
Make the sheet public (change it from restricted to anyone with the link and copy the link) eg : https://docs.google.com/spreadsheets/d/139xIKz3YSN7_ehr6Ha4DwpYynq86YlYm8BJDw8HCQlA/edit?usp=sharing , extract the portion after
d/and before/edit..eg :139xIKz3YSN7_ehr6Ha4DwpYynq86YlYm8BJDw8HCQlA -
Place the extracted portion as a query parameter in the link
?val=<id>eg : https://ishaan5199.github.io/Data-Table/?val=139xIKz3YSN7_ehr6Ha4DwpYynq86YlYm8BJDw8HCQlA -
If not provided as
valparameter, dummy table will be displayed. -
Google Sheet can have n number of columns and rows, for specific splitting and displaying of data in any column, alter after line 19's comment
-
Returned JSON data from the opensheet api : https://opensheet.elk.sh/139xIKz3YSN7_ehr6Ha4DwpYynq86YlYm8BJDw8HCQlA/Sheet1
-
If working on any other sheet replace
/Sheet1with your specific sheet on line 3 of init.js file
- HTML, CSS, JS
Ishaan Mahesh
You can find me here at: LinkedIn

