Skip to content
This repository has been archived by the owner on Aug 3, 2021. It is now read-only.

load workbook ValueError Duplicate position 0.0 #37

Closed
bossdesmaths opened this issue Oct 13, 2019 · 1 comment
Closed

load workbook ValueError Duplicate position 0.0 #37

bossdesmaths opened this issue Oct 13, 2019 · 1 comment

Comments

@bossdesmaths
Copy link

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

@adamjsawicki
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants