MATLAB app designer run issue

5 vues (au cours des 30 derniers jours)
Prajwal Venkatesh
Prajwal Venkatesh le 19 Fév 2020
Commenté : Jyotsna Talluri le 26 Fév 2020
I get this issue every other random time
Sometimes it works sometimes it dosent
Error using xlsread (line 257)
Invoke Error, Dispatch Exception:
Source: Microsoft Excel
Description: Excel cannot open the file 'Bunks11.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.
Help File: xlmain11.chm
Help Context ID: 0
Error in manpower2 (line 7)
parfor k=1:numel(sheet_name)
What is the solution?
  2 commentaires
Prajwal Venkatesh
Prajwal Venkatesh le 26 Fév 2020
I tried parfor loop too and it reduced to 30 seconds
Prajwal Venkatesh
Prajwal Venkatesh le 26 Fév 2020
But can i run it any faster?

Connectez-vous pour commenter.

Réponses (1)

Jyotsna Talluri
Jyotsna Talluri le 25 Fév 2020
The error may be due to the Excel COM Automation server. Kill all running Excel processes from Windows Task Manager if any and try restarting the MATLAB and run the script again. If the issue still persists, then try using xlsread in ‘basic’ mode.
Refer to the below link to know more about ‘basic’ mode
As xlsread is not recommended to use in the latest versions of matlab, I would suggest you to use readtable instead.
  2 commentaires
Prajwal Venkatesh
Prajwal Venkatesh le 26 Fév 2020
The error still persists if I use basic mode.
I did not get this error in the 2019a version
My excel workbooks automatically open when i start my computer eventhough i have disabled all startup applications related to this.
I used readtable and my run time was 54 seconds which was about the same for xlsread?
I have attached a document in this comment which has multiple sheets and i need to store all that data in those sheets in an array so the code i am using is
tic
fullFileName = 'Bunks11.xlsx';
[status, sheetNames] = xlsfinfo('Bunks11.xlsx');
numSheets = length(sheetNames);
for i=1:numSheets
t1{i,1} = readtable(fullFileName, 'Sheet', i);
end
toc
So this takes 54 seconds and i want to read 200 files of this sort.
What is the best way and should i change my document format to something else?
Jyotsna Talluri
Jyotsna Talluri le 26 Fév 2020
Reading files in .csv format takes less time compared to reading files in .xlsx format .Even using the readtable in 'basic' mode reduces the time to some extent

Connectez-vous pour commenter.

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by