-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexcel_input_main.py
More file actions
39 lines (32 loc) · 1.21 KB
/
excel_input_main.py
File metadata and controls
39 lines (32 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
LEGACY ENTRY POINT - Excel/VBA Integration
==========================================
This is the entry point for the legacy Excel/VBA integration version of ACSAHE.
This version is maintained but deprecated. New users should use the modern desktop version.
Modern version entry point: main.py
Legacy implementation: legacy/excel_input_acsahe.py
Build spec: ACSAHE_excel.spec
See LEGACY.md for detailed documentation.
"""
import sys
import traceback
from tkinter import messagebox
from PyQt5.QtWidgets import QApplication
from legacy.excel_input_acsahe import ExcelInputACSAHEGUI
if __name__ == '__main__':
# Obtiene la ruta a la planilla
path_exe = sys.argv[0]
nombre_del_archivo = sys.argv[1].split("--wb=")[-1]
path_archivo = '\\'.join(path_exe.split('\\')[:-2])
file_path = path_archivo + "\\" + nombre_del_archivo
#
# path_archivo = "\\".join(path_exe.split("\\")[:-1])
# nombre_del_archivo = "ACSAHE Drinco 2D.xlsm"
app_gui = QApplication(sys.argv)
try:
# Start engine
ex = ExcelInputACSAHEGUI(app_gui, nombre_del_archivo, path_archivo)
except Exception as e:
traceback.print_exc()
messagebox.showinfo("Error", str(e))
QApplication.quit()