Hi Everybody,
I am trying (without success) to have my app save an excel document as an XMLSpreadsheet.
Does anyone know the correct syntax to do this?
#define adOpenForwardOnly 0
#define adOpenKeyset 1
#define adOpenDynamic 2
#define adOpenStatic 3
#define adLockReadOnly 1
#define adLockPessimistic 2
#define adLockOptimistic 3
#define adLockBatchOptimistic 4
#define adPersistXML 1
FUNCTION MAIN()
LOCAL oRs := CREATEOBJECT( "ADODB.Recordset" )
FERASE( "MYTEST.XML" )
oRs:Open( "SELECT * FROM [Sheet name$]", "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\xharbour\mytest.xls;Extended Properties='Excel 8.0;HDR=Yes;IMEX=1'", adOpenForwardOnly, adLockReadOnly )
oRs:Save( "E:\XHARBOUR\MYTEST.XML", adPersistXML )
oRs:Close()
RETURN NIL
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 116 guests