Dear everyone,
i have some troubles using tksheets in tkinter GUI. So with csv writter i write the data from tk.Entries and tksheets into txt file (or csv). when I open it i could lost one row in the sheet. With entries there are no problems, except the entries with higher index than tk sheets, as the sheets are shrinking? in is sort of weird as in the first save everyting is ok in txt or csv script, loading is also ok, but with multiple savings and loading, even without any data manipulation i lose rows. I will not claim that every save cost me a row, so the issue it is not really absolutelly repetable, however at 5 save/load repetitions i definetely lost one row?. Here is part of the code, if it is of any help?
def shrani_datoteko():
data = [('Txt Documents(*.txt)', '*.txt')]
file = asksaveasfilename(filetypes=data, defaultextension=data)
with open(file, 'w', encoding='utf-8', newline='') as f:
writer = csv.writer(f, delimiter=';')
writer.writerow(['PODATKI ZA PRESKUS'])
writer.writerow(['Nadmorska višina (m):', h.get()])
.#code fot the tk.Entries
#
writer.writerow(['PREGLEDNICA ODČITKOV ZA REFERENCO'])
data_ref = preglednica_ref.get_sheet_data(get_header=True, get_index=False, get_rows=False, get_columns=False)
for row in data_ref:
writer.writerow(row)
..............................
Dear everyone, i have some troubles using tksheets in tkinter GUI. So with csv writter i write the data from tk.Entries and tksheets into txt file (or csv). when I open it i could lost one row in the sheet. With entries there are no problems, except the entries with higher index than tk sheets, as the sheets are shrinking? in is sort of weird as in the first save everyting is ok in txt or csv script, loading is also ok, but with multiple savings and loading, even without any data manipulation i lose rows. I will not claim that every save cost me a row, so the issue it is not really absolutelly repetable, however at 5 save/load repetitions i definetely lost one row?. Here is part of the code, if it is of any help? def shrani_datoteko():