首页 > 解决方案 > 使用表单上传excel文件后如何获取excel工作表的名称

问题描述

我目前正在上传一个包含一张工作表的 excel 文件,我想知道如何提取工作表的名称。

<form id="uploadForm" name="form1" method="post" enctype="multipart/form-data" action="/api/BulkUpload" target="dummyframe" onsubmit="return Validate(this);">
    <div></div>
    <div id="inputLabel">
        <input id="fileinput" name="image1" type="file" />
    </div>
    <div>
        <span class="btn btn-success fileinput-button">
            <i class="icon-plus icon-white"></i>
            <span>upload file</span>
            <input id="submitButton" class="submit" type="submit" value="ok" @*onclick="setTimeout(clearLabel,3000)"*@ />
        </span>
    </div>
</form>

标签: javascriptjqueryhtmlasp.net-mvcforms

解决方案


I figured the simplest way was to get the user to enter the name of the sheet on which processing must be done. In the event that the user does not enter a sheet name I default to a hardcoded sheet name in order to run my stored procedure.


推荐阅读