def read_hd_file_template(self, source_dir, hd_template):
"""Try to read the specified template file and send to sheet loading method."""
template_path = os.path.join(source_dir, hd_template)
try:
hd_template_workbook = pd.ExcelFile(template_path, comment="#", dtype=object)
except FileNotFoundError:
raise Validity.TemplateException("Could not find high-dim template file at: {0}".format(template_path))
# except XLRDError:
# raise Validity.TemplateException(
# "High-dim template file at: {0} is not a valid xlsx file.".format(template_path))
self._load_sheets(hd_template_workbook)
评论列表
文章目录