public static int[][] ReadValueLocArray2(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; int len = sheet.GetRecord(index).HeaderContentLength[column]; int[][] result = new int[len][]; for (int i = 0; i < len; i++) { result[i] = ParseCsvRecordLocArray(sheet.GetValue(i + row, column)); } return(result); }
public static int ReadValueCsvRecordId(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; return(ParseCsvRecordId(sheet.GetValue(row, column))); }
public static int[] ReadValueLocArray(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; int len = sheet.GetRecord(index).HeaderContentLength[column]; int[] result = new int[len]; for (int i = 0; i < len; i++) { if (string.IsNullOrEmpty(sheet.GetValue(row + i, column))) { result[i] = 0; } else { result[i] = LocalizationCsvData.IdRecordValue[sheet.GetValue(i + row, column)]; } } return(result); }
public static int ReadValueDicValue(CsvSpreadSheet sheet, int index, string headerName) { if (headerName == "_VALUE" && sheet.dicWithoutValue) { return(sheet.Records[index].KeyValue); } int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; return(ParseInt(sheet.GetValue(row, column))); }
public static int[] ReadValueCsvIdArrayLine(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; var line = sheet.GetValue(row, column).Split(new Char[] { '|', '#' }); int[] result = new int[line.Length]; for (int i = 0; i < line.Length; i++) { result[i] = ParseCsvRecordId(line[i]); } return(result); }
public static int ReadValueCsvLoc(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; if (string.IsNullOrEmpty(sheet.GetValue(row, column))) { return(0); } else { return(LocalizationCsvData.IdRecordValue[sheet.GetValue(row, column)]); } }
public static int[] ReadValueLocArrayLine(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; var line = sheet.GetValue(row, column).Split(new Char[] { '|', '#' }); int[] result = new int[line.Length]; for (int i = 0; i < line.Length; i++) { if (string.IsNullOrEmpty(sheet.GetValue(row + i, column))) { result[i] = 0; } else { result[i] = LocalizationCsvData.IdRecordValue[sheet.GetValue(i + row, column)]; } } return(result); }
public static decimal[] ReadValueDecimalArrayLine(CsvSpreadSheet sheet, int index, string headerName) { int row = sheet.GetRecord(index).StartRow; int column = sheet.GetHeaderRecord(headerName).Index; var v = sheet.GetValue(row, column); string[] line; if (string.IsNullOrEmpty(v)) { line = new string[0]; } else { line = sheet.GetValue(row, column).Split(new Char[] { '|', '#' }); } decimal[] result = new decimal[line.Length]; for (int i = 0; i < line.Length; i++) { result[i] = ParseDecimal(line[i]); } return(result); }