Can't read excel file using readtable and detectImportOptions after compiling the App. It works perfectly fine in the test environment

5 views (last 30 days)
I have created an app using App Designer in 2021a. All the functionalities work well in the test environment. However, when I compile the app either as a standalone executable or a WebApp server, it fails to read the excel file that I'm uploading into the app. Below are the things that I've already tried:
  1. Using full filepath and file name in readtable
  2. Instead of uploading a an excel spreadsheet, I tried defining the path and filename as hard code in the app
Below is the screenshot from the WebApp log. It seems that the spreadsheet is not readable. I've also given link to access my entire application and the sample spreadsheets: Application and Files
  1 Comment
dpb
dpb on 21 May 2021
NB: the warning "Using Excel is not recommended for web apps"
I'd guess there's the root of the problem in that it doesn't have access to Excel runtime.
I've been building a coded app that also reads/writes Excel spreadsheets, but it's running on the local machine, not over the web, and it works just fine either as compiled or in test/development environment.
Also note it says it "Unable to open .... as a workbook" not that the file isn't found.

Sign in to comment.

Answers (1)

Marius Mueller
Marius Mueller on 21 Jul 2021
I have the exact same issue.
Everything was peachy in R2020b but once i switched to R2021a this error occurs.
I could not find any related information in the release notes.
Does anyone know of a workaround when the input format has to be excel?

Products


Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!