lenovo
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import fdb
|
||||
import firebirdsql as fdb
|
||||
import openpyxl
|
||||
from openpyxl.styles import Font, PatternFill, Alignment
|
||||
from openpyxl.utils import get_column_letter
|
||||
@@ -8,20 +8,22 @@ import sys
|
||||
|
||||
# --- Připojení ---
|
||||
conn = fdb.connect(
|
||||
dsn=r'localhost:c:\medicus 3\data\medicus.fdb',
|
||||
user='SYSDBA', password='masterkey', charset='win1250'
|
||||
host='192.168.1.10',
|
||||
port=3050,
|
||||
database=r'm:\Medicus\data\MEDICUS.FDB',
|
||||
user='SYSDBA', password='masterkey', charset='WIN1250'
|
||||
)
|
||||
cur = conn.cursor()
|
||||
|
||||
# --- Výstupní soubor ---
|
||||
output_dir = r'u:\Dropbox\!!!Days\Downloads Z230'
|
||||
output_dir = r'z:\Dropbox\Ordinace\Reporty'
|
||||
now = datetime.now()
|
||||
filename = now.strftime('%Y-%m-%d_%H-%M-%S') + '_faktury.xlsx'
|
||||
filename = now.strftime('%Y-%m-%d %H-%M-%S') + ' faktury.xlsx'
|
||||
output_path = os.path.join(output_dir, filename)
|
||||
|
||||
# --- Smazání předchozích verzí ---
|
||||
for f in os.listdir(output_dir):
|
||||
if f.endswith('_faktury.xlsx'):
|
||||
if f.endswith(' faktury.xlsx'):
|
||||
os.remove(os.path.join(output_dir, f))
|
||||
|
||||
wb = openpyxl.Workbook()
|
||||
|
||||
Reference in New Issue
Block a user