{"id":15499749,"url":"https://github.com/nicolaslopezj/excel-export","last_synced_at":"2025-10-29T21:36:45.883Z","repository":{"id":66339922,"uuid":"42063087","full_name":"nicolaslopezj/excel-export","owner":"nicolaslopezj","description":"Export excel files with Meteor","archived":false,"fork":false,"pushed_at":"2015-09-07T17:34:11.000Z","size":91,"stargazers_count":8,"open_issues_count":6,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T19:41:56.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/nicolaslopezj.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":"2015-09-07T16:19:46.000Z","updated_at":"2020-01-28T09:00:14.000Z","dependencies_parsed_at":"2023-02-23T04:00:36.142Z","dependency_job_id":null,"html_url":"https://github.com/nicolaslopezj/excel-export","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/nicolaslopezj%2Fexcel-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fexcel-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fexcel-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolaslopezj%2Fexcel-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolaslopezj","download_url":"https://codeload.github.com/nicolaslopezj/excel-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337933,"owners_count":21414102,"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":[],"created_at":"2024-10-02T08:55:06.647Z","updated_at":"2025-10-29T21:36:45.823Z","avatar_url":"https://github.com/nicolaslopezj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Excel Export\n============\n\n```sh\nnicolaslopezj:excel-export\n```\n\nExport data to excel in Meteor.\n\n### ```Excel.export(title, fields, data)```:\n\n- ```title```: ```String```. The name of the file.\n- ```fields```: ```[field]```. Description of the fields to include in the file.\n- ```data```: ```[Object]```. Array of data.\n\n**```field```:**\n\n- ```key```: ```String```. The path to the key, accept dot for nesting.\n- ```title```: ```String```. The title of the column.\n- ```type```: ```String```. Optional. The type of the data for the column, defaults to ```string```. Allowed values: ```string```, ```date```, ```bool``` and ```number```.\n- ```width```: ```Number```. Optional. The width of the column. defaults to ```28.7109375```.\n- ```transform```: ```Function```. Optional. A function that takes the value of the field as the first argument and the document as the second, must return the new value for the row.\n\n### Example:\n\n```js\nRouter.route('/download-data', function() {\n  var data = Posts.find().fetch();\n  var fields = [\n    {\n      key: 'id',\n      title: 'URL',\n      transform: function(val, doc) {\n        return Router.url('posts.show', { _id: val });\n      } \n    },\n    {\n      key: 'message',\n      title: 'Message'\n    },\n    {\n      key: 'viewsCount',\n      title: 'Views',\n      type: 'number'\n    }\n  ];\n\n  var title = 'Posts';\n  var file = Excel.export(title, fields, data);\n  var headers = {\n    'Content-type': 'application/vnd.openxmlformats',\n    'Content-Disposition': 'attachment; filename=' + title + '.xlsx'\n  };\n\n  this.response.writeHead(200, headers);\n  this.response.end(file, 'binary');\n}, { where: 'server' });\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslopezj%2Fexcel-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolaslopezj%2Fexcel-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolaslopezj%2Fexcel-export/lists"}