Export Columnar Sales Register into Excel using XML request

Discussion in 'Tally Developer' started by Researcher1, May 6, 2024.

    
  1. Researcher1

    Researcher1 Member


    I want to export the Columnar Sales Register from Tally and found instructions on how to do this in the link below:

    https://www.rtslink.com/articles/tally-xml-tags-export/

    For your information, here is the query mentioned on the website:

    Code:
    <ENVELOPE>
      <HEADER>
        <TALLYREQUEST>Export Data</TALLYREQUEST>
      </HEADER>
      <BODY>
        <EXPORTDATA>
          <REQUESTDESC>
            <STATICVARIABLES>
              <!--Specify the Voucher Type here-->
              <VOUCHERTYPENAME>Sales</VOUCHERTYPENAME>
              <!--Specify the Export format here: HTML, XML, or SDF-->
              <SVEXPORTFORMAT>$$SysName:XML</SVEXPORTFORMAT>
              <SVFROMDATE TYPE='Date'>20211001</SVFROMDATE>
              <SVTODATE TYPE='Date'>20211030</SVTODATE>
              <!--Set the Columnar format variable here-->
              <COLUMNARDAYBOOK>Yes</COLUMNARDAYBOOK>
              <!--Set the SVColumntype variable here-->
              <SVCOLUMNTYPE>$$SysName:AllItems</SVCOLUMNTYPE>
            </STATICVARIABLES>
            <!--Specify the Report Name here-->
            <REPORTNAME>Voucher Register</REPORTNAME>
          </REQUESTDESC>
        </EXPORTDATA>
      </BODY>
    </ENVELOPE>
    
    However, the link only explains how to obtain the response in XML, HTML, or SDF formats. Could you please provide a request to save the response in Excel format?
     


  2. Sai Vineeth

    Sai Vineeth Active Member


    In general, you will not get data from tally in Excel through xml,
    you need to write code to transform xml to excel
     


  3. Researcher1

    Researcher1 Member


    In the XML Response , its showing voucherwise report.
    Below is the columnar XML response from tally Software. I want the XML response of my request to be in this format itself.

    Code:
    <ENVELOPE>
    <DBCFIXED>
      <DBCDATE>1-Apr-21</DBCDATE>
      <DBCPARTY> Partyname</DBCPARTY>
    </DBCFIXED>
    <DBCBUYERNAME>Partyname</DBCBUYERNAME>
    <DBCPARTYNAME>Partyname</DBCPARTYNAME>
    <DBCVCHTYPE>Sales</DBCVCHTYPE>
    <DBCVCHNO>1-3</DBCVCHNO>
    <DBCGSTIN></DBCGSTIN>
    <DBCREPTDELNODATE></DBCREPTDELNODATE>
    <DBCREPTDELDOCNO></DBCREPTDELDOCNO>
    <DBCREPTDELREPTTHROUGH></DBCREPTDELREPTTHROUGH>
    <DBCREPTDELDESTINATION></DBCREPTDELDESTINATION>
    <DBCPLACEOFRCPTBYSHIP></DBCPLACEOFRCPTBYSHIP>
    <DBCVESSELFLIGHTNO></DBCVESSELFLIGHTNO>
    <DBCPORTOFLOADING></DBCPORTOFLOADING>
    <DBCPORTOFDISCHARGE></DBCPORTOFDISCHARGE>
    <DBCCOUNTRYTO></DBCCOUNTRYTO>
    <DBCGSTSHIPPINGNO></DBCGSTSHIPPINGNO>
    <DBCGSTSHIPPINGDATE></DBCGSTSHIPPINGDATE>
    <DBCGSTPORTCODE></DBCGSTPORTCODE>
    <DBCGROSSAMT>-130.00</DBCGROSSAMT>
    <DBCLEDAMT>115.78</DBCLEDAMT>
    <DBCLEDAMT>104.11</DBCLEDAMT>
    <DBCLEDAMT>101.11</DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    <DBCLEDAMT></DBCLEDAMT>
    </ENVELOPE>
    Can you please modify my XML request so that the response is in the above format?
     


Share This Page