chronossc/openpyxl

load workbook ValueError Duplicate position 0.0

Closed this issue · 1 comments

Hi
I'm trying to open a xlsx file but I've this error :
raise ValueError("Duplicate position {0}".format(stop.position))
ValueError: Duplicate position 0.0
I don't understand what does it mean and I haven't found an issue explained for this error. Here is my code in file gestion_fichiers_excel :

**from openpyxl import load_workbook
from openpyxl import Workbook

def loadfile():
workbook = load_workbook(filename="Feuille_decisions.xlsx")
return workbook**
def get_decisions(workbook):
num_entreprise=workbook.active["B4"].value
prix_prod1=workbook.active["B7"].value
prix_prod2=workbook.active["C7"].value
list_decisions=[num_entreprise,prix_prod1,prix_prod2]
return list_decisions

And another file which calls gestion_fichiers_excel :

**import os
import tkinter as tk
import tkinter.ttk
from gestion_base import *
from gestion_fichiers_excel import ***

class PageDecisions(tk.Frame):
def init(self, master):
self.workbook=loadfile()
self.list_decisions=get_decisions(self.workbook)

Thanks for your help

@bossdesmaths As a heads up, Openpyxl development was moved here.