using Microsoft.AspNetCore.Mvc;
namespace FlexSheetExplorer.Views.FlexSheet
{
public partial class FlexSheetController : Controller
{
public ActionResult ExcelService()
{
return View();
}
}
}
@section Scripts{
@{
string webApiClient;
#if NETCORE31
webApiClient = "Scripts/wijmo.io/webapiclientCore22.min.js";
#else
webApiClient = "Scripts/wijmo.io/webapiclient.min.js";
#endif
}
<script src="@Url.Content("~/")@webApiClient" ></script>
<script src="@Url.Content("~/")Scripts/flexSheet/excelService.js"></script>
<script>
ctx.serverUrl = '@AppSettings.GetWebApiServiceUrl()';
</script>
}
<div>
<div class="copy">
<h3>
@Html.Raw(FlexSheetRes.ExcelService_Text2)
</h3>
<p>@Html.Raw(FlexSheetRes.ExcelService_Text0)</p>
<c1-flex-sheet id="excelServiceSheet" class="flexSheet" file-path="~/Content/xlsxFile/example1.xlsx"></c1-flex-sheet>
<div class="panel panel-warning">
<div class="panel-heading">@Html.Raw(FlexSheetRes.ExcelService_Text5)</div>
<div class="panel-body">
<div class="row">
<c1-menu id="exportFormat" header="@Html.Raw(FlexSheetRes.Export_Format_Text0) <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>@Html.Raw(FlexSheetRes.ExcelService_Text6)</span>
<input id="exportName" type="text" class="form-control input-control" value="export" />
<button class="btn btn-primary" onclick="exportFlexSheet()">@Html.Raw(FlexSheetRes.ExcelService_Text3)</button>
</div>
<div class="row">
<input type="file" id="fileinput" class="form-control input-control" />
<button class="btn btn-primary" onclick="importFlexSheet()">@Html.Raw(FlexSheetRes.ExcelService_Text4)</button>
</div>
</div>
</div>
</div>
</div>
@section Summary{
<p>@Html.Raw(FlexSheetRes.ExcelService_Text1)</p>
}