MATLAB Answers

0

what a sign for this error ?

Asked by Muhammad Dzul Akbar on 29 Aug 2018
Latest activity Edited by Greg
on 30 Aug 2018
Hello guys
does anyone know which part is wrong?

  1 Comment

What does
which xlsread
return?

Sign in to comment.

1 Answer

Answer by Greg
on 29 Aug 2018

There's not a lot to go on, but my only guess is you don't have MS Office Excel installed on a Windows machine. Without Excel installed, xlsread operates in 'basic' mode, which does not support the numeric worksheet input. Considering no sheet number input defaults to the first worksheet, simply try:
xlsread(fileread);

  3 Comments

thank you for your response @greg, ms excel has been installed in my windows. sometimes the code is successful and sometimes error. do you know other causes? the code line in my opinion is no error, isn't that right?
Can you elaborate when the error occurs and on which files?
Also xlsread will not work if the file is opened in Excel.
"Also xlsread will not work if the file is opened in Excel."
I just tested that explicitly this morning and it does in fact work. At least with whatever edition of Excel I have (2013? maybe), and R2017b on Win10.
I also checked having a file with no worksheets, but Excel won't let you do that. Maybe if some other application created a .xls file with no sheets...

Sign in to comment.