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]; } }
public TabFileWriter(TableFile <T> tabFile) { TabFile = tabFile; CheckHeaders(); }
public TabFileWriter() { TabFile = new TableFile <T>(); CheckHeaders(); }
public TabFileWriter(TableFile tabFile) { TabFile = tabFile; }
public TabFileWriter() { TabFile = new TableFile(); }
// 直接从字符串分析 public static TableFile LoadFromString(string content) { TableFile tabFile = new TableFile(content); return(tabFile); }