Geoffrey J. Teale пре 6 година
родитељ
комит
8af32a69f7
3 измењених фајлова са 0 додато и 54 уклоњено
  1. 0 39
      lib.go
  2. 0 12
      sheet.go
  3. 0 3
      stream_test.go

+ 0 - 39
lib.go

@@ -720,45 +720,6 @@ func readSheetFromFile(sc chan *indexedSheet, index int, rsheet xlsxSheet, fi *F
 	if nil != worksheet.DataValidations {
 		for _, dd := range worksheet.DataValidations.DataValidation {
 			sheet.AddDataValidation(dd)
-			// sqrefArr := strings.Split(dd.Sqref, " ")
-			// for _, sqref := range sqrefArr {
-			// 	parts := strings.Split(sqref, cellRangeChar)
-
-			// 	minCol, minRow, err := GetCoordsFromCellIDString(parts[0])
-			// 	if nil != err {
-			// 		return fmt.Errorf("data validation %s", err.Error())
-			// 	}
-
-			// 	if 2 == len(parts) {
-			// 		maxCol, maxRow, err := GetCoordsFromCellIDString(parts[1])
-			// 		if nil != err {
-			// 			return fmt.Errorf("data validation %s", err.Error())
-			// 		}
-
-			// 		if minCol == maxCol && minRow == maxRow {
-			// 			newDD := new(xlsxDataValidation)
-			// 			*newDD = *dd
-			// 			newDD.Sqref = ""
-			// 			sheet.Cell(minRow, minCol).SetDataValidation(newDD)
-			// 		} else {
-			// 			// one col mutli dd , error todo
-			// 			for i := minCol; i <= maxCol; i++ {
-			// 				newDD := new(xlsxDataValidation)
-			// 				*newDD = *dd
-			// 				newDD.Sqref = ""
-			// 				sheet.Col(i).SetDataValidation(dd, minRow, maxRow)
-			// 			}
-
-			// 		}
-			// 	} else {
-			// 		newDD := new(xlsxDataValidation)
-			// 		*newDD = *dd
-			// 		newDD.Sqref = ""
-			// 		sheet.Cell(minRow, minCol).SetDataValidation(dd)
-
-			// 	}
-			// }
-
 		}
 
 	}

+ 0 - 12
sheet.go

@@ -319,18 +319,6 @@ func (s *Sheet) makeCols(worksheet *xlsxWorksheet, styles *xlsxStyleSheet) (maxL
 			if col.OutlineLevel > maxLevelCol {
 				maxLevelCol = col.OutlineLevel
 			}
-			// if nil != col.DataValidation {
-			// 	if nil == worksheet.DataValidations {
-			// 		worksheet.DataValidations = &xlsxDataValidations{}
-			// 	}
-			// 	colName := ColIndexToLetters(c)
-			// 	for _, dd := range col.DataValidation {
-			// 		if dd.minRow == dd.maxRow {
-			// dd.Sqref = colName + RowIndexToString(dd.minRow)
-			// 		} else {
-			// 			dd.Sqref = colName + RowIndexToString(dd.minRow) + cellRangeChar + colName + RowIndexToString(dd.maxRow)
-			// 		}
-
 		})
 
 	return maxLevelCol

+ 0 - 3
stream_test.go

@@ -235,9 +235,6 @@ func TestXlsxStreamWrite(t *testing.T) {
 		},
 	}
 	for i, testCase := range testCases {
-		// if testCase.testName != "One Sheet" {
-		// 	continue
-		// }
 		t.Run(testCase.testName, func(t *testing.T) {
 			var filePath string
 			var buffer bytes.Buffer