Unable to read excel file with latest excel js. File Not Found.
See original GitHub issueUnable to read excel file with latest excel js. File is not found. Getting the following error while trying to read excel files. I have double checked. The relative path provided is correct.
Unhandled rejection Error: File not found: ../TestData/TestData.xlsx
at C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\lib\xlsx\xlsx.js:60:17
at tryCatcher (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\util.js:16:23)
at Promise._settlePromiseFromHandler (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\promise.js:503:31)
at Promise._settlePromise (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\promise.js:560:18)
at Promise._settlePromise0 (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\promise.js:605:10)
at Promise._settlePromises (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\promise.js:684:18)
at Async._drainQueue (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\async.js:126:16)
at Async._drainQueues (C:\Users\xxx\Documents\Eclipse\CSS_Sample\node_modules\exceljs\node_modules\bluebird\js\release\async.js:136:10)
at Immediate.Async.drainQueues [as _onImmediate](C:UsersxxxDocumentsEclipseCSS_Samplenode_modulesexceljsnode_modulesbluebirdjsreleaseasync.js:16:14)
at processImmediate [as _immediateCallback](timers.js:383:17)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Files do not open in Excel or "File Not Found" occurs when ...
Start the Microsoft Windows Explorer. · On the Tools menu, click Folder Options. · Click the File Types tab. · Click the file...
Read more >Reading Excel through exceljs module - Stack Overflow
My Question is How to provide relative path of excel file in readFile() . I want to provide path for Data. xls in...
Read more >[Solved] Excel Cannot Open the File Because the Extension Is ...
Summary: This post discusses workarounds to resolve the 'Excel cannot open the file because the extension is not valid' error.
Read more >[FIXED] Excel Cannot Open the File Because The Extension Is ...
The Excel file is not compatible with the version of MS Excel you're using. 4. Why can't I open an XLSX file? When...
Read more >Get rid of "The file is corrupt and cannot be opened" in Excel
How to open a corrupt xls. file in Excel 2010 - 365 · Open Excel. · Click on File -> Options. · Select...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have solved the problem as follows. `const exceljs = require(‘exceljs’); const fs = require(‘fs’); const path = ‘path/archive.xlsx’; const excel = fs.realpathSync(path,{encoding:‘utf8’});
const wb = new exceljs.Workbook;
wb.xlsx.readFile(excel).then(function(){
}).catch(error => { console.error(‘Algo salio mal’, error); });`
I solved it give the whole path of the file