Go excel Error. Work on 2 computers and not on the others...

Go excel Error. Work on 2 computers and not on the others...

Remy-intl
Advocate Advocate
765 Views
8 Replies
Message 1 of 9

Go excel Error. Work on 2 computers and not on the others...

Remy-intl
Advocate
Advocate

Hello,

I created an ilogic external rule that uses GoExcel.

The rule works on my workstation and on my personnal computeur but bug on the PCs of my colleagues. The error I get varies:

 

Error1: 

Impossible d'effectuer un cast d'un objet COM de type 'Microsoft.Office.Interop.Excel.ApplicationClass' en type d'interface 'Microsoft.Office.Interop.Excel._Application'. Cette opération a échoué, car l'appel QueryInterface sur le composant COM pour l'interface avec l'IID '{000208D5-0000-0000-C000-000000000046}' a échoué en raison de l'erreur suivante : Élément introuvable. (Exception de HRESULT : 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).

 

Error2:

Cannot find the column header "TypeProfil" (The column does exist in Excel (standard cell format))

 

Would you know why?

 

We use differents versions of office. 

The rules works on personnal and familly office 2019 and also on Microsoft Office 365.

The rules don't works on Microsoft Office 365 busines...

 

Thanks in advance for your time.

 

The rule is below.

The error start on line "Ligne1 = GoExcel.FindRow(oExcelPath, "Index", "TypeProfil", "=", Parameter("TypeDeProfil"))"

oExcelPath= "C:\VaultWorkspace\Designs\Fichiers Matières ERP\ListeCDC.xlsx"


'Determine l'onglet dans lequel on doit cherché la Matière automatique
Ligne1 = GoExcel.FindRow(oExcelPath, "Index", "TypeProfil", "=", Parameter("TypeDeProfil"))
Onglet1 = GoExcel.CurrentRowValue("NomOnglet")


Select Case Parameter("TypeDeProfil")
	

'CAS1---------------------------
	Case "Plat"
	'MessageBox.Show(iProperties.Material, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur", "=", Parameter("Para_A"),"Epaisseur", "=", Parameter("Para_B"),"MatièreInventor", "=", iProperties.Material)
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
				
				
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				If i2 = -1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Plat "&Parameter("Para_A") & "x"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Plat "&Parameter("Para_A") & "x"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
		End If
'CAS2---------------------------
		Case "Rond"
			'MessageBox.Show(iProperties.Material, "c'est du rond")

			'Cherche une combinaison de Dimension et matière dans le fichier excel
			
			'TEST ligne ci dessous masqué
			i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Diamètre", "=", Parameter("Para_A"),"MatièreInventor", "=", iProperties.Material)
				'A = GoExcel.CellValue(oExcelPath, Onglet1, "A2")
				'B = GoExcel.CellValue(oExcelPath, Onglet1, "C2")
				'C = GoExcel.CellValue(oExcelPath, Onglet1, "B2")
				'MessageBox.Show(A, "Lecture diametre")
				'MessageBox.Show(B, "Matière")
				'MessageBox.Show(C, "Matière")
				'MessageBox.Show(iProperties.Material, "Matière")
				
				
			
				'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
				If i1 = -1 Then
						'MessageBox.Show(iProperties.Material, "c'est du rond manuel")
						'Dim MonMot As String 
						'MonMot = "La section " & Parameter("Para_A") & "x"  &Parameter("Para_B")& " en " & iProperties.Material & " n'est pas dans base de données. La matière ERP est de type MMxxxxx"
						
						i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
						If i2 = -1 Then 
							MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
						Else	
						MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
						
						iProperties.Value("Custom", "MatièreERP") = MatErp
						iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
						iProperties.Value("Project", "Stock Number")="Rond Ø"&Parameter("Para_A") & " L="&Parameter("Para_L")&"mm"
						End If
			
			'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
					Else
						'MessageBox.Show(iProperties.Material, "c'est du rond auto")
						MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
						
						iProperties.Value("Custom", "MatièreERP") = MatErp
						iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
						iProperties.Value("Project", "Stock Number")="Rond Ø"&Parameter("Para_A") & " L="&Parameter("Para_L")&"mm"
		End If
'CAS3---------------------------		
Case "Ebauche"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "De", "=", Parameter("Para_A"), "Di", "=", Parameter("Para_B"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Ø"&Parameter("Para_A") & "/Ø"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "E" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Ø"&Parameter("Para_A") & "/Ø"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
		End If
		
	
'CAS4---------------------------		
Case "Cornière LAC à ailes égales (Din)"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur", "=", Parameter("Para_A"), "Epaisseur", "=", Parameter("Para_B"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_A") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_A") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
		End If		

'CAS5---------------------------		
Case "Cornière LAC à ailes inégales (Din)"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur1", "=", Parameter("Para_A"),"Largeur2", "=", Parameter("Para_B"), "Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_B") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_B") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
		End If		

'CAS 6---------------------------		
Case "Cornière LAC à ailes inégales (Iso)"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur1", "=", Parameter("Para_A"),"Largeur2", "=", Parameter("Para_B"), "Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_B") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Cornière LAC  "&Parameter("Para_A") & "x"&Parameter("Para_B") & " Ep"  &Parameter("Para_B")& " L="&Parameter("Para_L")&"mm"
		End If	
	
'CAS 7---------------------------		
Case "UPE"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="UPE "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="UPE "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If
		
'CAS 8---------------------------	
	Case "UPN"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="UPN "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="UPN "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If
		
'CAS 9---------------------------	
	Case "U plié à froid"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur", "=", Parameter("Para_A"),"Hauteur", "=", Parameter("Para_B"),"Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="U à froid "&Parameter("Para_B") &"x"&Parameter("Para_A")&"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="U à froid "&Parameter("Para_B") &"x"&Parameter("Para_A")&"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
			End If
'CAS 10---------------------------	
	Case "Tube Carré"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"),"Epaisseur", "=", Parameter("Para_B"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Tube "&Parameter("Para_A") &"x"&Parameter("Para_A")&" Ep"&Parameter("Para_B")&" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Tube "&Parameter("Para_A") &"x"&Parameter("Para_A")&" Ep"&Parameter("Para_B")&" L="&Parameter("Para_L")&"mm"
		End If

'CAS 11---------------------------	
	Case "Tube Rectangulaire"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"),"Largeur", "=", Parameter("Para_B"),"Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Tube "&Parameter("Para_A") &"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "E" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Tube "&Parameter("Para_A") &"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
		End If

'CAS 12---------------------------	
	Case "Equerre Alu"
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show("Cas 12 Equerre Alu", "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")
	'Cherche une combinaison de Dimension et matière dans le fichier excel
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'MessageBox.Show(Parameter("tempA") , "Title")
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Largeur1", "=", Parameter("Para_A"),"Largeur2", "=", Parameter("Para_B"),"Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)


	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Equerre "&Parameter("Para_A") &"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "F" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="Equerre "&Parameter("Para_A") &"x"&Parameter("Para_B")&" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
		End If

'CAS 13---------------------------	
	Case "U en alu"
		'MessageBox.Show("Cas 13 U en Alu", "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")
	
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"),"Largeur", "=", Parameter("Para_B"),"Epaisseur", "=", Parameter("Para_C"), "MatièreInventor", "=", iProperties.Material)

'MessageBox.Show(i1, "Para_A")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="U "&Parameter("Para_B") &"x"&Parameter("Para_A")&"x"& Parameter("Para_B") &" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "E" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="U "&Parameter("Para_B") &"x"&Parameter("Para_A")&"x"& Parameter("Para_B") &" Ep"&Parameter("Para_C")&" L="&Parameter("Para_L")&"mm"
		End If

'CAS 14---------------------------	
	Case "IPN"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPN "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPN "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If

'CAS 15---------------------------	
	Case "IPE"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPE "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPE "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If
		
'CAS 16---------------------------	
	Case "IPB"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPB "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="IPB "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If

'CAS 17---------------------------	
	Case "HEA"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEA "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEA "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If

'CAS 18---------------------------	
	Case "HEB"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEB "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEB "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If
		
		
'CAS 19---------------------------	
	Case "HEM"
		
	'MessageBox.Show(iProperties.Material, "Para_A")
	'MessageBox.Show(Onglet1, "Para_A")

	'Cherche une combinaison de Dimension et matière dans le fichier excel
	i1 = GoExcel.FindRow(oExcelPath, Onglet1, "Hauteur", "=", Parameter("Para_A"), "MatièreInventor", "=", iProperties.Material)
	'Parameter("tempA") = GoExcel.CellValue(oExcelPath, Onglet1, "A1")
	'Parameter("tempB") = GoExcel.CellValue(oExcelPath, Onglet1, "B1")
	'Parameter("tempMat")=GoExcel.CellValue(oExcelPath, Onglet1, "D1")
	
		'Si on ne trouve pas la combinaison i=-1 et on utilise une matière manuelle
			If i1 = -1 Then
		
				i2 = GoExcel.FindRow(oExcelPath, "Matière Manuelle", "MatièreInventor", "=", iProperties.Material)
				
				If i2 = - 1 Then 
					MessageBox.Show("Une matière d'inventor n'est pas definit dans le fichier Excel", "ERREUR")
				Else	
			
				MatErp = GoExcel.CellValue(oExcelPath, "Matière Manuelle", "B" & i2)
				'MessageBox.Show(Parameter("Para_A"), "A")
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEM "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
				End If
	
	'Si on  trouve  la combinaison -> on utilise une matière auto MAxxxxx	
			Else
				MatErp = GoExcel.CellValue(oExcelPath, Onglet1, "D" & i1)
				
				iProperties.Value("Custom", "MatièreERP") = MatErp
				iProperties.Value("Custom", "LongueurERP") = Parameter("Para_L")
				iProperties.Value("Project", "Stock Number")="HEM "&Parameter("Para_A") &" L="&Parameter("Para_L")&"mm"
		End If

	Case Else
		MessageBox.Show("Rien n'a été trouvé vérifier les valeurs indiquées", "Il y a un problème")


End Select 

 

 

 

0 Likes
Accepted solutions (2)
766 Views
8 Replies
Replies (8)
Message 2 of 9

dutt.thakar
Collaborator
Collaborator

@Remy-intl 

 

Which version of Inventor is installed in your and your colleague's computer? Is it same or different?

If this answer has solved your problem please ACCEPT SOLUTION and hit like if you found it helpful..!


Regards,
Dutt Thakar
LinkedIn
0 Likes
Message 3 of 9

Remy-intl
Advocate
Advocate

Hello,

 

It s the same.

 

The computers and programs are indentical.

We use inventor pro 2019 with vault 2019. 

Just excel version are diferents. I have office 365 and my collegues office 365 business.

 

Thanks 

 

 

0 Likes
Message 4 of 9

bradeneuropeArthur
Mentor
Mentor

Do you have "Show file extensions" on for both workstations?

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 5 of 9

Remy-intl
Advocate
Advocate

Hello.

 

No "Show file extensions" is not activate on any workstation.

 

 

Message 6 of 9

JMGunnar
Collaborator
Collaborator
Accepted solution

This solve my problem 

 

You need reinstall office 

check if you get messege thats you have  "mixed installation" off 32-bits and 64 bits 

you get options too install 32-bits

 

reinstall 64 bits office

 

Best Johan G

 

0 Likes
Message 7 of 9

bradeneuropeArthur
Mentor
Mentor

Hi,

 

Check this out:

Have you fulfill all of the requirements?

https://www.x-cad.pl/files/inventor-2019-system-requirements.pdf 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 8 of 9

Remy-intl
Advocate
Advocate
I'm going to try this.

Thanks a lot.

0 Likes
Message 9 of 9

Remy-intl
Advocate
Advocate
Accepted solution

Hello.

 

Finally I delete Office 365 business and replace by Office 2019 pro and every thing works perfectly.

 

Thanks everyone for the time you spent on this problem.

 

0 Likes