We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Unable to open an external XLSX file with same code as demo but in nextjs

Neither it works with openUrl nor using the ref and then setting the file in created event. Here is the codesandbox.


1 Reply 1 reply marked as answer

VR Vasanth Ravi Syncfusion Team March 21, 2023 05:50 AM UTC

Hi Majid,

Upon verifying your provided code-sandbox sample, we noticed that you had provided the file load URL on the openURL.



On the open URL, you must provide the server-side action URL, not the file load URL. With the server-side action URL, we make a call to the XLSIO engine and perform the import action.


You must provide the file load URL only on the fetch method, not on the open method. We have modified the sample and attached it below for your reference. 


Sample Link: https://codesandbox.io/s/next-js-forked-mxijnl?file=/index.js 

Also attached are the API links for reference.




Marked as answer
Live Chat Icon For mobile
Up arrow icon