function Global_getTableFromCVS(fileName)
if fileName==nil then
return {}
end
local path=cc.FileUtils:getInstance():fullPathForFilename(fileName)
local file = io.open(path, "r+");
local arr={}
for line in file:lines() do
local tmpArr=string.split(line,",")
table.insert(arr,tmpArr)
end
io.flush()
io.close(file)
return arr
end
使用string.split是quick中的方法cvs文件要使用windowsofffice生成,mac版的offfice似乎不能区分换行function Global_getTableFromCVS(fileName) if fileName==nil then return {} end local path=cc.FileUtils:getIn