Documentation / Tutorials / Awesome Enterprise

Importing Excel Awesome Enterprise

/ Awesome Enterprise / Importing Excel Awesome Enterprise

If you are import data from excel file to costume post type or costume database table. Here is a quick reference guide to help you import.

 

This task divided in two part.

  • Ticket generating
  • Excel configuration

 

Part-1

  • Create module in App. Add following code.
    [templates.add main]
        [templates.html_output set=template.html/]      
        [ui.outer-block.main html={template.html} title="Data impoter"/]    
    [/templates.add]
    //**  html logged in interaction  ***//
    [templates.add html_output]
    <section role="import-lead">
        <div class="gap-8"></div>
        <div class="container">
            <div class="row">
                <div class="col-md-12 col-lg-12 col-sm-12 col-12 text-center form-outer-layer ">
                    <h6 class="font-bold text-uppercase text-center">Required Fields for template in xlsx Sample</h6>
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <tr>
                                <th>App Id</th>
                                <th>Student Name</th>
                                <th>Email</th>
                                <th>Alternate Email</th>
                                <th>Mobile</th>
                                <th>Alternate Mobile</th>
                                <th>Date of Birth</th>
                                <th>Gender</th>
                                <th>State of Residence</th>
                                <th>Course Applied For</th>
                                <th>Year of Planned Admission</th>
                                <th>Applied On</th>
                                <th>Status </th>
                                <th>Preferred Time </th>
                                <th>Category</th>
                                <th>Comments</th>
                            </tr>
                        </table>
                    </div>
                    <div class="gap-3"></div>
                    <button class="btn btn-primary" axn=control.update control='main.sections.ticket-info' bind='click' route_ajax='[module.slug /].get_ticket' call_template='xlsx_output'> Get Ticket to Import Excle</button>
                    <div class="gap-3"></div>
                    <section role="ticket-info"></section>
                </div>
            </div>
        </div>
    </section>
    [/templates.add]
    
    
    //** Get Ticket **//
    [templates.add get_ticket]
    [session_ticket.create set=module.ticket/]
    [session_ticket.set_activity {module.ticket} app='{app.slug}' module='{module.slug}.{request.call_template}' /]
    [date.create now date_format='Y-m-d H:i:s' set=template.dt /]
    <b>[template.dt]:</b> Ticket Is <b class="brand-fifth">[module.ticket/]</b> 
    [/templates.add]
    
    
    
    [templates.add xlsx_output]
    //*check permission and authentication*//
    [wp.signon username="{request.username}" password="{request.password}" set=template.x /]
    
    //* your get excel data in request var *// 
    [aw2.get request.app_id set="module.app_id" /] //* data of A2 cell. make sure A1 cell name is app_id or app id *//
    
    //* put your logic here *//
    
    
    [/templates.add]
    

    Part-2 (Excel setting)

    here is sample attachment file.

Setting Tab

  • Download .XLSM file.
  • Go to excel setting tab in .xlsm file.
  • Set username, Password and Ticket. This is your  wp login creation.

Internal Tab

  • Set URL in internal tab. The format of url is  “{domain_name}/t”.(https://www.example.com/t)
Categories
Most Popular

Leave a Reply

Your email address will not be published. Required fields are marked *