knify 1.8.55__tar.gz → 1.8.56__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {knify-1.8.55 → knify-1.8.56}/PKG-INFO +1 -1
- {knify-1.8.55 → knify-1.8.56}/knify/excelutil.py +7 -1
- {knify-1.8.55 → knify-1.8.56}/knify/help.py +1 -1
- {knify-1.8.55 → knify-1.8.56}/knify.egg-info/PKG-INFO +1 -1
- {knify-1.8.55 → knify-1.8.56}/LICENSE +0 -0
- {knify-1.8.55 → knify-1.8.56}/README.md +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/__init__.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/dateutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/fileutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/listutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/logger.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/objutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/threadutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify/warnutil.py +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify.egg-info/SOURCES.txt +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify.egg-info/dependency_links.txt +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify.egg-info/requires.txt +0 -0
- {knify-1.8.55 → knify-1.8.56}/knify.egg-info/top_level.txt +0 -0
- {knify-1.8.55 → knify-1.8.56}/setup.cfg +0 -0
- {knify-1.8.55 → knify-1.8.56}/setup.py +0 -0
@@ -50,7 +50,7 @@ def read_excel(file_path: str, sheet: str | int | None = 0, headers: list[Header
|
|
50
50
|
results = []
|
51
51
|
workbook = load_workbook(filename=file_path)
|
52
52
|
sheet_ = workbook[sheet] if isinstance(sheet, str) else workbook[workbook.sheetnames[sheet]]
|
53
|
-
headers_ = [cell.value for cell in sheet_[
|
53
|
+
headers_ = [cell.value for cell in sheet_[start_row]]
|
54
54
|
for row_idx, row in enumerate(sheet_.rows):
|
55
55
|
if row_idx < start_row:
|
56
56
|
continue
|
@@ -72,3 +72,9 @@ def read_excel(file_path: str, sheet: str | int | None = 0, headers: list[Header
|
|
72
72
|
if objutil.has_keys(result):
|
73
73
|
results.append(result)
|
74
74
|
return results
|
75
|
+
|
76
|
+
|
77
|
+
def read_headers(file_path: str, sheet: str | int | None = 0, header_row: int = 0):
|
78
|
+
workbook = load_workbook(filename=file_path)
|
79
|
+
sheet_ = workbook[sheet] if isinstance(sheet, str) else workbook[workbook.sheetnames[sheet]]
|
80
|
+
return [cell.value for cell in sheet_[header_row + 1]]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|