Effacer les filtres
Effacer les filtres

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

4 vues (au cours des 30 derniers jours)
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 commentaire
dpb
dpb le 21 Mai 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.

Connectez-vous pour commenter.

Réponses (1)

Marius Mueller
Marius Mueller le 21 Juil 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?

Catégories

En savoir plus sur Use COM Objects in MATLAB dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by