ozon_real_hndler 1.0
This commit is contained in:
@@ -25,7 +25,7 @@ class BaseHandler:
|
||||
class YandexHandler(BaseHandler):
|
||||
def process(self):
|
||||
# читаем Excel внутри объекта
|
||||
dfs = pd.read_excel(self.file_path, sheet_name=None, skiprows=[0, 1, 3])
|
||||
dfs = pd.read_excel(self.file_path, sheet_name=None, skiprows=[0, 1, 3]) #skip header
|
||||
# проверяем наличие нужных листов
|
||||
if "Получено от потребителей" not in dfs or "Возвращено потребителям" not in dfs:
|
||||
raise Exception(f"В файле {self.file_path.name} отсутствуют необходимые листы")
|
||||
@@ -43,7 +43,7 @@ class WBHandler(BaseHandler):
|
||||
|
||||
class OZONHandler(BaseHandler):
|
||||
def process(self):
|
||||
dfs = pd.read_excel(self.file_path, sheet_name=None)
|
||||
dfs = pd.read_excel(self.file_path, sheet_name=None, skiprows=14, skipfooter=17) #skip the header and the footer
|
||||
if "Отчет о реализации" not in dfs:
|
||||
raise Exception(f"В файле {self.file_path.name} отсутствуют необходимые листы")
|
||||
print("Реализация OZON")
|
||||
|
||||
Reference in New Issue
Block a user