Author | Topic: XmlImport | |
---|---|---|
Paul Chong | XmlImport on Fri, 28 Mar 2014 13:45:33 +0800 Hi, How to translate this to xBase? ActiveWorkbook.XmlImport URL:="F:\Pos\Excel\CUSTOMER.XML", ImportMap _ :=Nothing, Overwrite:=True, Destination:=Range("$A$8") I tried this but not working. oExcel := CreateObject("Excel.Application") oExcel:DisplayAlerts := .F. oExcel:visible := .T. oBook := oExcel:workbooks:Add() oSheet := oBook:ActiveSheet oExcel:ActiveWorkbook:XmlImport("F:\Pos\Excel\CUSTOMER.XML","") ------------------------------------------------------------------------------ ERROR LOG of "F:\Pos\BACKOFFICE.EXE" Date: 28/03/2014 06:08:33AM Xbase++ version : Xbase++ (R) Version 1.90.355 Operating system : Windows 7 06.01 Build 07601 Service Pack 1 ------------------------------------------------------------------------------ oError:args : -> VALTYPE: C VALUE: XmlImport -> VALTYPE: C VALUE: F:\Pos\Excel\CUSTOMER.xml -> VALTYPE: C VALUE: Nothing oError:canDefault : Y oError:canRetry : N oError:canSubstitute: Y oError:cargo : NIL oError:description : Type mismatch. Parameter has a wrong data type oError:filename : NIL oError:genCode : NIL oError:operation : XmlImport oError:osCode : -2147352571 oError:severity : 2 oError:subCode : 6500 oError:subSystem : Automation oError:thread : 4 oError:tries : NIL ------------------------------------------------------------------------------ CALLSTACK: ------------------------------------------------------------------------------ Called from AUTOMATIONOBJECT:ONERROR(1344) Called from ASCOMERROR:RAISE(324) Called from ASCOMERROR:RAISEERROR(593) Called from ASCOMERROR:RAISEONERROR(672) Called from AUTOMATIONOBJECT:NOMETHOD(1238) Called from PRINTINGPURCHASEORDER(720) | |
James Loughner | Re: XmlImport on Sat, 29 Mar 2014 16:25:29 -0400 try leaving the last empty string character off. oExcel:ActiveWorkbook:XmlImport("F:\Pos\Excel\CUSTOMER.XML", "" <this ) Jim On 03/28/2014 01:45 AM, Paul Chong wrote: > Hi, > > How to translate this to xBase? > > ActiveWorkbook.XmlImport URL:="F:\Pos\Excel\CUSTOMER.XML", ImportMap _ > :=Nothing, Overwrite:=True, Destination:=Range("$A$8") > > I tried this but not working. > > oExcel := CreateObject("Excel.Application") > oExcel:DisplayAlerts := .F. > oExcel:visible := .T. > oBook := oExcel:workbooks:Add() > oSheet := oBook:ActiveSheet > oExcel:ActiveWorkbook:XmlImport("F:\Pos\Excel\CUSTOMER.XML","") > > ------------------------------------------------------------------------------ > ERROR LOG of "F:\Pos\BACKOFFICE.EXE" Date: 28/03/2014 06:08:33AM > > Xbase++ version : Xbase++ (R) Version 1.90.355 > Operating system : Windows 7 06.01 Build 07601 Service Pack 1 > ------------------------------------------------------------------------------ > oError:args : > -> VALTYPE: C VALUE: XmlImport > -> VALTYPE: C VALUE: F:\Pos\Excel\CUSTOMER.xml > -> VALTYPE: C VALUE: Nothing > oError:canDefault : Y > oError:canRetry : N > oError:canSubstitute: Y > oError:cargo : NIL > oError:description : Type mismatch. > Parameter has a wrong data type > oError:filename : NIL > oError:genCode : NIL > oError:operation : XmlImport > oError:osCode : -2147352571 > oError:severity : 2 > oError:subCode : 6500 > oError:subSystem : Automation > oError:thread : 4 > oError:tries : NIL > ------------------------------------------------------------------------------ > CALLSTACK: > ------------------------------------------------------------------------------ > Called from AUTOMATIONOBJECT:ONERROR(1344) > Called from ASCOMERROR:RAISE(324) > Called from ASCOMERROR:RAISEERROR(593) > Called from ASCOMERROR:RAISEONERROR(672) > Called from AUTOMATIONOBJECT:NOMETHOD(1238) > Called from PRINTINGPURCHASEORDER(720) > |