How to search in excel file ?

1 vue (au cours des 30 derniers jours)
Ramy Roshdy
Ramy Roshdy le 12 Mar 2017
Réponse apportée : dpb le 12 Mar 2017
A variable x= 123abc, I want to search with variable x in a excel file. Excel file example:
123abc 1200
I want it to return 1200 (corresponding column)

Réponses (1)

dpb
dpb le 12 Mar 2017
In general you'll be better off reading the Excel file and doing any search/selection in memory discarding what you don't need instead. There's no builtin Matlab function to do other than read a rectangular section form a Matlab file, so other stuff would needs must be done via COM using Excel syntax to do the operations and that is an Excel programming question not Matlab (other than opening the ActiveX connection).
The one way otherwise would be to have created a name for the location in the Excel sheet; xlsread will accept a name as a RANGE argument.

Community Treasure Hunt

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

Start Hunting!

Translated by