How to find strings in an excel file?

I want to find all colons in an excel file
colons = findstr(char, ':');
colons shows up empty. why is that?

1 Comment

Have you loaded the data from Excel file to matlab?

Sign in to comment.

 Accepted Answer

Diana
Diana on 9 Apr 2013
Thanks for your reply
Yes, I did.
I also tried
colons = findstr(string, ':');
Any idea of what could be wrong?

4 Comments

try
find(strcmp(':',string ))
The string here should be a cell matrix loaded from the Excel file. This function returns the location of the colons.
I had to change to
find(strcmp(':',char)) so it would work
But it is still returning empty
sorry, I think it is not good to use string as the name of the variable.
find(strcmp(':',text_load_from_Excel ))
text_load_from_Excel is a cell type variable loaded from the Excel file
No worries. Can you explain to me what a cell type variable is?

Sign in to comment.

More Answers (0)

Asked:

on 8 Apr 2013

Community Treasure Hunt

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

Start Hunting!