{"id":20382670,"url":"https://github.com/autodesk-forge/viewer-javascript-extract.spreadsheet","last_synced_at":"2025-04-12T08:53:56.312Z","repository":{"id":19014500,"uuid":"82089252","full_name":"Autodesk-Forge/viewer-javascript-extract.spreadsheet","owner":"Autodesk-Forge","description":"Extract Revit Properties into Excel: This sample uses Model Derivative API endpoints to read a Revit project properties and create a XLSX Excel file with one sheet for each type/category with all objects on it","archived":false,"fork":false,"pushed_at":"2022-12-11T00:19:13.000Z","size":14541,"stargazers_count":35,"open_issues_count":3,"forks_count":25,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-12T08:53:50.576Z","etag":null,"topics":["javascript","model-derivative","viewer","xls"],"latest_commit_sha":null,"homepage":"https://viewerxls.autodesk.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Autodesk-Forge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T17:52:45.000Z","updated_at":"2022-12-19T01:49:47.000Z","dependencies_parsed_at":"2023-01-11T20:30:31.233Z","dependency_job_id":null,"html_url":"https://github.com/Autodesk-Forge/viewer-javascript-extract.spreadsheet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fviewer-javascript-extract.spreadsheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fviewer-javascript-extract.spreadsheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fviewer-javascript-extract.spreadsheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Autodesk-Forge%2Fviewer-javascript-extract.spreadsheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Autodesk-Forge","download_url":"https://codeload.github.com/Autodesk-Forge/viewer-javascript-extract.spreadsheet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248543882,"owners_count":21121838,"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":["javascript","model-derivative","viewer","xls"],"created_at":"2024-11-15T02:18:34.654Z","updated_at":"2025-04-12T08:53:56.293Z","avatar_url":"https://github.com/Autodesk-Forge.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# viewer-javascript-extract.spreadsheet\nJavaScript sample to extract Revit files from [Model Derivative API](https://developer.autodesk.com/en/docs/model-derivative/v2) as Spreadsheet (Excel XLSX)\n\n[![Viewer](https://img.shields.io/badge/Viewer-v7-green.svg)](http://developer.autodesk.com/)\n[![License](http://img.shields.io/:license-mit-blue.svg)](http://opensource.org/licenses/MIT)\n[![Model-Derivative](https://img.shields.io/badge/Model%20Derivative-v2-green.svg)](http://developer.autodesk.com/)\n\n# Description\n\nThis sample uses Model Derivative API endpoints to read a Revit project properties and create a XLSX Excel file with one sheet for each type/category with all objects on it. Non-Revit files are not supported (different structure). [Here is another version](https://github.com/Autodesk-Forge/model.derivative-csharp-context.menu) for desktop.\n\n![thumbnail](/thumbnail.png)\n\n## Demonstration\n\nRun it live at [this page](https://viewerxls.autodesk.io), or locally by following these steps:\n\n- create a Forge application if you don't have one yet ([tutorial](https://forge.autodesk.com/en/docs/oauth/v2/tutorials/create-app/))\n- make sure you have at least one file prepared for viewing ([tutorial](https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/prep-file4viewer/))\n- clone this git repository\n- navigate to the repository root folder and install npm dependencies\n  - on Windows/macOS/Linux: `npm install`\n- prepare required environment variables\n  - on Windows:\n    ```\n    set FORGE_CLIENT_ID=\u003cyour client id\u003e\n    set FORGE_CLIENT_SECRET=\u003cyour client secret\u003e\n    set FORGE_BUCKET=\u003cyour data bucket\u003e\n    ```\n  - on macOS/Linux:\n    ```\n    export FORGE_CLIENT_ID=\u003cyour client id\u003e\n    export FORGE_CLIENT_SECRET=\u003cyour client secret\u003e\n    export FORGE_BUCKET=\u003cyour data bucket\u003e\n    ```\n- run the application\n  - on Windows/macOS/Linux: `npm run dev`\n- go to http://localhost:3000\n\n# Usage\n\nAdd reference to the ForgeXLS file:\n\n```\n\u003cscript src=\"ForgeXLS.js\"\u003e\u003c/script\u003e\n```\n\nThen call **downloadXLSX** method passing the URN and a data:read token.\n\n```\nfunction downloadExcel() {\n   ForgeXLS.downloadXLS(theURN, token, statusCallback /*Optional*/);\n}\n```\n\n## Dependencies\n\nThis project depends on [Sheet JS](https://github.com/SheetJS/js-xlsx) to manipulate spreadsheet files. The [FileSaver](https://github.com/eligrey/FileSaver.js/) library is used to create \u0026 download a file on the client. [BlobJS](https://github.com/eligrey/Blob.js) is required for older browsers ([see compatibility](https://github.com/eligrey/FileSaver.js/#supported-browsers)). [jQuery](https://jquery.com) is also used.\n\n```\n\u003cscript src=\"jquery.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"Blob.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"FileSaver.min.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"xlsx.core.min.js\"\u003e\u003c/script\u003e\n```\n\n# License\n\nThis sample is licensed under the terms of the [MIT License](http://opensource.org/licenses/MIT).\nPlease see the [LICENSE](LICENSE) file for full details.\n\n## Written by\n\nAugusto Goncalves [@augustomaia](https://twitter.com/augustomaia), [Forge Partner Development](http://forge.autodesk.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fviewer-javascript-extract.spreadsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fautodesk-forge%2Fviewer-javascript-extract.spreadsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fautodesk-forge%2Fviewer-javascript-extract.spreadsheet/lists"}