Esempio n. 1
0
        private void ParseTsv(string filePath)
        {
            _tableFile   = TableFile.LoadFromFile(filePath, Encoding.GetEncoding("GBK"));
            _columnCount = _tableFile.GetColumnCount();


            // 通过TableFile注册头信息
            var commentRow = _tableFile.GetRow(1);

            foreach (var kv in _tableFile.Headers)
            {
                var header = kv.Value;
                ColName2Index[header.HeaderName]     = header.ColumnIndex;
                Index2ColName[header.ColumnIndex]    = header.HeaderName;
                ColName2Statement[header.HeaderName] = header.HeaderMeta;
                ColName2Comment[header.HeaderName]   = commentRow[header.ColumnIndex];
            }
        }