读取CSV文件
CommaTextIO m_CSVFile;
container m_con;
InventTable m_inventTable;
int i;
#File
;
m_CSVFile = new CommaTextIO("C:\\Users\\JSZhang1002\\Desktop\\Data\\Items.csv", #io_read);
if (!m_CSVFile || m_CSVFile.status() != IO_Status::Ok)
throw error("访问磁盘失败。");
while (m_CSVFile.status() == IO_Status::Ok)
{
m_con = m_CSVFile.read();
if (m_con != connull())
{
info(strFmt("itemID: %1, itemName: %2 ",
conpeek(m_con,1),conpeek(m_con,2)));
}
}
posted on 2015-04-15 10:40 Kobe.Zhang 阅读(148) 评论(0) 编辑 收藏 举报