Created
January 15, 2021 18:53
-
-
Save davidcsejtei/95e8dbe7aa283edc0fe8d499470a0602 to your computer and use it in GitHub Desktop.
Example of download an excel file with Express
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const router = express.Router(); | |
| router.get('/excel/example', (request, response) => { | |
| response.download('./excelFiles/foods.xlsx', 'example.xlsx'); | |
| }); | |
| module.exports = router; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment