ilds 2.3.2__tar.gz → 2.3.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ilds-2.3.2 → ilds-2.3.3}/PKG-INFO +1 -1
- {ilds-2.3.2 → ilds-2.3.3}/ilds/excel.py +12 -2
- {ilds-2.3.2 → ilds-2.3.3}/ilds/versions.py +1 -1
- {ilds-2.3.2 → ilds-2.3.3}/ilds.egg-info/PKG-INFO +1 -1
- {ilds-2.3.2 → ilds-2.3.3}/README.rst +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/__init__.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/cmd.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/__init__.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/admin.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/import_export.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/model.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/user.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/django/util.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/everything.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/excel_xlrd.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/excel_xlsx.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/file.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/__init__.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/browsercookie.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/configobj/__init__.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/configobj/_version.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/configobj/validate.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/lib/hexdump.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/match_data.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/md.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/md5summer.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/mycsv.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/net.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/pd.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/spider.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/time.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds/util.py +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds.egg-info/SOURCES.txt +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds.egg-info/dependency_links.txt +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds.egg-info/requires.txt +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/ilds.egg-info/top_level.txt +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/setup.cfg +0 -0
- {ilds-2.3.2 → ilds-2.3.3}/setup.py +0 -0
|
@@ -140,7 +140,7 @@ class ReadExcel:
|
|
|
140
140
|
print(excel.set_sheet(10)) # 这个要判断下是否成功
|
|
141
141
|
print(excel.next_sheet(), excel.sheet_index)
|
|
142
142
|
"""
|
|
143
|
-
# print('args', args,'kwargs',kwargs)
|
|
143
|
+
# print('args', args, 'kwargs', kwargs)
|
|
144
144
|
# 打开的表索引,可以指定默认值
|
|
145
145
|
self.sheet_index = kwargs.pop('sheet_index', 0)
|
|
146
146
|
|
|
@@ -159,7 +159,17 @@ class ReadExcel:
|
|
|
159
159
|
|
|
160
160
|
# self.excel = 'xlsx'
|
|
161
161
|
# 加载工作簿
|
|
162
|
-
|
|
162
|
+
if args or 'filename' in kwargs:
|
|
163
|
+
try:
|
|
164
|
+
self.wb = load_workbook(*args, **kwargs)
|
|
165
|
+
except FileNotFoundError:
|
|
166
|
+
# 如果文件不存在,创建一个新的工作簿
|
|
167
|
+
self.wb = Workbook()
|
|
168
|
+
print(f'{args} {kwargs} 文件不存在,创建新表格')
|
|
169
|
+
else:
|
|
170
|
+
self.wb = Workbook()
|
|
171
|
+
print('创建新表格')
|
|
172
|
+
|
|
163
173
|
self.sheet_names = self.wb.sheetnames
|
|
164
174
|
self.set_sheet(self.sheet_index)
|
|
165
175
|
# print(self.excel)
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|