我理解愚蠢的问题和FAQ,但我无法在excel列中设置自动宽度(使用ClosedXML.Excel库)
我的代码:
var wb = new XLWorkbook();
var wsDep = wb.Worksheets.Add("MyWorksheet");
wsDep.Columns("A").AdjustToContents();
wsDep.Columns("B1").AdjustToContents();
wsDep.Columns().AdjustToContents();
Run Code Online (Sandbox Code Playgroud)
但没有变化.如何使用ClosedXML.Excel库设置自动宽度列?
我在IIS上托管了我的 ASP.NET Core 应用程序(使用文件夹内发布方法)。我尝试创建自己的web.config文件以查看客户端的详细错误消息。所以我添加了文件web.config:
<configuration>
<system.web>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<httpErrors errorMode="Detailed" />
</system.webServer>
</configuration>
Run Code Online (Sandbox Code Playgroud)
我重新启动 IIS 后,什么也没发生。客户端仍然收到默认错误:
我可以使用文件web.config以某种方式获取有关错误的其他信息吗?
如何使用NEST2部分更新记录?
我正在寻找一个模拟请求:POST / erection / shop / 1 / _update {“ doc”:{“ new”:“ 0”}}
而无需重新创建新记录。不幸的是,我没有在www.elastic.co/guide/en/elasticsearch/client/net-api/current/index.html中找到有关更新的任何信息
更新:
var updateResponse = es.Current.Update<MyDocument, MyDocument> (DocumentPath<MyDocument>.Id(2), descriptor => descriptor
.Doc(new MyDocument
{
name = "new name"
}));
Run Code Online (Sandbox Code Playgroud)
我运行了这段代码,但是它完全更新了整个文档。
结果https://gyazo.com/2fdae851bb8bc445f6e8e58abb2f0e3b 我在做什么错?
c# ×2
.net ×1
asp.net-core ×1
closedxml ×1
excel ×1
iis-10 ×1
nest ×1
updates ×1
web-config ×1
xls ×1