@using FlexSheetExplorer.Models;
<script src="~/js/wijmo.io/webapiclient.min.js"></script>
<script src="~/js/flexSheet/excelService.js"></script>
<script>
    ctx.serverUrl = '@AppSettings.GetWebApiServiceUrl()';
</script>
<div>
    <div class="copy">
        <h3>
            Excel Service
        </h3>
        <p>
            This sample demonstrates how to import and export FlexSheet to an Excel file by using the Web API Edition Excel Service.
        </p>
        <c1-flex-sheet id="excelServiceSheet" class="flexSheet" file-path="~/xlsxFile/example1.xlsx"></c1-flex-sheet>

        <div class="panel panel-warning">
            <div class="panel-heading">Export & Import</div>
            <div class="panel-body">
                <div class="row">
                    <c1-menu id="exportFormat" header="Export Format: <b>XLSX</b>"
                             execute-command="exportFormatChanged">
                        <c1-menu-item header="XLSX" command-parameter="@("Xlsx")"></c1-menu-item>
                        <c1-menu-item header="XLS" command-parameter="@("Xls")"></c1-menu-item>
                        <c1-menu-item header="CSV" command-parameter="@("Csv")"></c1-menu-item>
                    </c1-menu>
                    <span>Export Name : </span>
                    <input id="exportName" type="text" class="form-control input-control" value="export" />
                    <button class="btn btn-primary" onclick="exportFlexSheet()">Export</button>
                </div>
                <div class="row">
                    <input type="file" id="fileinput" class="form-control input-control" />
                    <button class="btn btn-primary" onclick="importFlexSheet()">Import</button>
                </div>
            </div>
        </div>
    </div>
</div>