Message 1 of 7
Excel Reading in ilogic code

Not applicable
03-01-2016
05:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
i read two excel files in this code. I want for Rows 4 to 8, 5 parts created with their name A1, B1, V, A2, B2...
in the loop that i write it creates the first one but for second it fives me the error as below
Error in rule: Rule6, in document: A final.ipt
GoExcel: Could not match the column title: "ID"
first i input 3 for ID=3 and then i write 4 in the form but it give me that error
Sub Main() ThisApplication.ActiveView.Fit For J=3 To 7 GoExcel.Open("C:\Users\a.khakbaz\Desktop\Inventor\Linking to Pv elit\nozzle\Nozzles", "Sheet1") VV=InputBox("Prompt", "id", "Default Entry",MessageBoxButtons.YesNo) If VV=0 Then Exit Sub End If i = GoExcel.FindRow("C:\Users\a.khakbaz\Desktop\Inventor\Linking to Pv elit\nozzle\Nozzles", "Sheet1","ID", "=", VV) N_ID= GoExcel.CurrentRowValue("nominalDiameter") PIPE_THK=GoExcel.CurrentRowValue("actualThickness") PRO_CEN=GoExcel.CurrentRowValue("outsideProjection") PAD_OD=GoExcel.CurrentRowValue("padDiameter") Dim sFilePath As String= ThisDoc.Path & "\" ThisDoc.Save doc = ThisDoc.Document sNewName=GoExcel.CellValue("B" & i) GoExcel.Close GoExcel.Open("C:\Users\a.khakbaz\Desktop\Inventor\Linking to Pv elit\nozzle\WNFLG2", "Sheet1") i = GoExcel.FindRow("C:\Users\a.khakbaz\Desktop\Inventor\Linking to Pv elit\nozzle\WNFLG2", "Sheet1","NPS","=",N_ID) iLogicVb.UpdateWhenDone = True O = GoExcel.CurrentRowValue("O") C1 = GoExcel.CurrentRowValue("C") CB = GoExcel.CurrentRowValue("CB") CC= GoExcel.CurrentRowValue("CC") R = GoExcel.CurrentRowValue("R") No = GoExcel.CurrentRowValue("No") G = GoExcel.CurrentRowValue("G") D = GoExcel.CurrentRowValue("D") X = GoExcel.CurrentRowValue("X") A1 = GoExcel.CurrentRowValue("A") Y1 = GoExcel.CurrentRowValue("Y1") YY = GoExcel.CurrentRowValue("YY") RA = GoExcel.CurrentRowValue("RA") RuleParametersOutput() GoExcel.Close ThisDoc.Document.Update() ThisDoc.Document.saveas(sFilePath & sNewName & ".ipt",True) Next J End Sub