Hi Statalists!

This will be my first posts, but I have been lurking around this forum for a while looking at answers provided to questions similar to ones I have had about Stata.
Currently I am working with a dataset with a large number of stock trading observations. After having cleaned up part of the data I now wish to extract all the unique cusip id's (= a string variable). Using: levelsof cusip, clean Stata shows the unique values I wish to export. However when trying to get Stata to export this into an excel file via putexcel (A1) = (levelsof cusip, clean) is gives an error saying levelsof not found. I suspect that this means that it it not possible to export the results of levelsof via this method but am not sure as I am still quite new to Stata. I hope someone here is able to help me export the unique id's and enlarge my understanding of Stata.

Kind regards,

Pim