clear; clc;

[~, ~, raw] = xlsread('stocks.xlsx')
query_stock = 'TSMC';
mask = strcmp(raw(:, 1), query_stock)
query_result = raw(mask, :);
xlswrite('output.xlsx', query_result);