ConvertSpot.com Excel to XML, Excel to XML Converter,  Convert Excel to XML
PDF to XML, Excel to Text, Excel to CSV, PDF to Text, Word to Text, PowerPoint to Text
 
   

Product->Convert Excel to XML(COM Edition)->Tech Document

Installation:

  • Download the 15 days trial version here.

  • Unzip the package to a folder on your hard drive.

  • Open an dos window and Go to the folder you store P2T Server Edition.

  • Run "regsvr32 E2TServer.dll" from command line to register the component.
     

    Check the methods exposed from the COM interface here.

    Examples:

  • Example in ASP

  • Example in PHP

  • Example in Cold Fusion

  • Example in VC

  • Example in VB

     

    Download Now          FAQ'S            Buy It Now

     

    Example in ASP:

    <%

    'Create the convert excel to xml object
    set e2x = Server.CreateObject("E2TServer.E2X")

    'VerifyLicense verify the username/keycode of excel xml converter.
    'it always success in trial version.
    e2x.VerifyLicense "4747457", "345srwr242342423"

    Response.Write e2x.Convert ("c:\test\test1.xls", "c:\box\test1.xml")+ "<br>"
    Response.Write e2x.Convert ("c:\test\test2.xls", "c:\box\test2.xml") + "<br>"
    Response.Write e2x.Convert2Mem ("c:\test\test3.xls", 50000) + "<br>"

    %>

    Go back to top
     

    Example in PHP:  

    <?php

    #Create excel to xml object
    $e2x = new COM("E2TServer.E2X");

    #VerifyLicense always success in trial version.
    $e2x->VerifyLicense("4747457", "345srwr242342423");

    #Convert excel file to xml file

    print $e2x->Convert ("c:\test\test1.xls", "c:\box\test1.xml"). "<br>";
    print $e2x->Convert ("c:\test\test2.xls", "c:\box\test2.xml"). "<br>";
    print $e2x->Convert2Mem ("c:\test\test3.xls", 50000). "<br>";

    #Release excel to xml object.
    $e2x = null;

    ?>

    Go back to top

    Example in ColdFusion:

    <cfobject type="COM"
        action="Create"
        name="e2x"
        class="E2TServer.E2X">
    <cfset strName="4747457">
    <cfset strKey="345srwr242342423">
    <cfset result = e2x.VerifyLicense(strName, strKey)>
    <cfset strExcelName="C:\test\test1.xls">
    <cfset strTXTName="C:\test\test1.txt">
    <cfset result=e2x.Convert(strExcelName, strTXTName)>
    <cfset result=e2x.Convert2Mem(strExcelName, 50000)>

    Go back to top


    Example in VC:


    You need generate wrapper class of Excel to text converter use class wizard first.
    "ClassWizard->ActiveX Events->Add Class->From a type lib..."
    ////////////////////////////////
    IE2X e2x;
    if(e2x.CreateDispatch("E2TServer.E2X"))
    {
    e2x.VerifyLicense("34234","234234");
    CString strRslt = e2x.Convert("C:\\test\\test1.xls","c:\\test\\test1.xml");
    MessageBox(LPCTSTR(strRslt));

    strRslt = e2x.Convert2Mem("C:\\test\\test2.xls",5000);
    MessageBox(LPCTSTR(strRslt));
    }
    /////////////////////////////////

    Go back to top


    Example in VB:


    You need to add the reference of Excel Text Converter to the project
    "Project->References..." Make sure "E2TServer Type Library" was selected there.

    '''''''''''''''''''''''''''''''''''''''''''''''''
    Dim myE2X As E2TSERVERLib.E2X
    Dim strRslt As String
    'Create the Excel to xml object
    Set myE2X = New E2X
     

    'Verify the license information of Excel to xml Converter.
    myE2X.VerifyLicense "234234", "23423432"

    'Convert Excel file to xml File.
    strRslt = myE2X.Convert(C:\test\test1.xls","c:\test\test1.xml")
    MsgBox strRslt

    strRslt = myE2X.Convert2Mem(C:\test\test2.xls",5000)
    MsgBox strRslt
    '''''''''''''''''''''''''''''''''''''''''''''''''

    Go back to top

    Any comments or question, Send email to
    support@retsinasoftware.com with "E2XCOM" in subject.

     

    COM Interface
    There's 4 methods exposed
    ///////////////////////////////////////////////////////
    1. HRESULT VerifyLicense(
    [in] BSTR bstrName,
    [in] BSTR bstrKey,
    [out, retval] long* pbRetVal);

    VerifyLicense is the method must be called before all other methods.
    It's to verify the run time license information.
    @param BSTR bstrName: The register name
    @param BSTR bstrKey: The register key code.
    @param long* pbRetVal: 1 If verify license cuccessfully.
                           0 If something wrong with the name/key
    This variable always be set to 1 in trial version
    @return S_OK

    ///////////////////////////////////////////////////////
    2. HRESULT GetVersion([out, retval] BSTR* pbstrVersion);

    Return the version information of Excel XML Converter.
    @param BSTR* pbstrVersion: The current version information was returned in this buffer.
    @return S_OK

    ///////////////////////////////////////////////////////
    3. HRESULT Convert(
    [in] BSTR bstrExcel,
    [in] BSTR bstrXML,
    [out, retval] BSTR* pbstrRetVal);

    @param BSTR bstrExcel: The absolute path and file name of the excel file you
    want to convert.
    @param BSTR bstrXML: The absolute path and file name of the xml file you
    want to convert to.
    @param BSTR* pbstrRetVal: The result and any warning/error information
    will return by this pointer

    @return S_OK: Process the excel file successfully. Check *pbstrRetVal for detail
    information. ///////////////////////////////////////////////////////
    4. HRESULT Convert2Mem(
    [in] BSTR bstrExcel,
    [in] int nBufSize,,
    [out, retval] BSTR* pbstrRetVal);

    @param BSTR bstrExcel: The absolute path and file name of the excel file you want to convert.
    @param BSTR nBufSize: The data buffer size for the output data, if the output data size is bigger than the buffer size, the converter just discard the overflowed data. There's a hard code limitation of buffer size, it's 5M, if pass in nBufSize is bigger than 5M, the converter will set the buffer size to 5M.
    @param BSTR* pbstrRetVal: The converted text will be return directly in the variable.
    @return S_OK: Process the excel file successfully. If it's not S_OK, check *pbstrRetVal for detail information.

    Go back to top

  •  

     
    2004 Retsina Software Solutions Ltd. All rights reserved.           Site Map  |  Contact us  |  Privacy Policy