For the past day i've been trying to get openpyxl or any other python excel library to read the cell value. But every time i run the program it returns with None
if i set it to data_only = True
. If i dont add the data_only it only returns the formula im using. This is my code:
wb = xl.load_workbook(str(tm.strftime("%d-%m-%Y")) + ' - ' + str(tm.strftime("%A")) + '.xlsx')
ws = wb.active
bag = float(self.entryBags.get())
ws['B3'] = bag
wb.save(str(tm.strftime("%d-%m-%Y")) + ' - ' + str(tm.strftime("%A")) + '.xlsx')
wb2 = xl.load_workbook(str(tm.strftime("%d-%m-%Y")) + ' - ' + str(tm.strftime("%A")) + '.xlsx', data_only = True)
ws2 = wb2.active
total_till = ws2['B13']
print(total_till.value)
If any one can give any suggestions on how to read the cell value, using openpyxl or any other python library, it would be very helpful.
Thanks