1
我試圖自動將excel導入Stata。這是我的非工作例子。這個錯誤告訴我,Stata並沒有將程序參數評估爲標量。我如何解決它?將標量值作爲參數傳遞給excel導入程序
scalar path = "C:\foo\data\"
scalar filename = "CompanyScores.xls"
scalar xlrange = "B3:AO149"
scalar sheet = "2012-2013 Scores"
scalar fullpath = path+"/"+filename
import excel fullpath, sheet(sheet) cellrange(xlrange) firstrow
太棒了。謝謝! – Trevor