Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel import error

Status
Not open for further replies.

Mab-a

Programmer
Jun 19, 2019
8
GH
Hi,
I get (Result: 161 Wrong xml file) , when i try to import employees from an excel using file vb.net.
Importing within Sage works ok.
Any help to resolve this would be much appreciated.

below is my code?
With IE
.Open(mDBLinkCmpRW)
.ImportAction = tagImportActionType.IMPORT_INSERT_AND_UPDATE
.SetViewEx("PM0021", "", tagViewType.VIEW_BATCH, vbNull, tagViewActionType.ACTION_ASK)
.SetViewEx("PM0022", "", tagViewType.VIEW_FLAT, vbNull, tagViewActionType.ACTION_ASK)
.SetViewEx("PM0039", "", tagViewType.VIEW_BATCH, vbNull, tagViewActionType.ACTION_ASK)
.VerifyOnPut = True
'
.GetExecuteResult(str)


If IE.ImpExpStatus = tagImportExportStatus.IE_SUCCESS Then

Else
sResultText += "Result: " & IE.ImpExpStatus

For i As Integer = 0 To mDBLinkCmpRW.Session.Errors.Count - 1
sResultText += vbTab & vbTab & mDBLinkCmpRW.Session.Errors.Item(i) & vbCrLf
Next

End If
.Close()
End With


Regards
 
What file are you telling it to import? The Excel file or the XML file?

Sage 300 Certified Consultant
 
Hi,
I am using the xml file

.ExecuteImportScript(sScriptFileName, True).


Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top