You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
我试图使用excelExporter.Append().SeparateByRow() 但在循环中
for (int i = 1; i <= writeCount; i++)
{
searchModel.Current = i;
var ms = GetData(searchModel, exportSettingModel.SelectDataSql);
var ms3 = ms.Copy();
if(i==1)
excelExporter=excelExporter.Append(ms);
else
{
excelExporter=excelExporter.SeparateByRow().Append(ms3);
}
}
ShiftTabelModel我标记了 [ExcelExporter(Name = "测试",AutoFitAllColumn = true, MaxRowNumberOnASheet = 10002)]
会报错ExportShit导出Error:Value cannot be null. (Parameter 'A sheet with the name already exists:测试')
使用excelExporter.Append(ms).SeparateByRow().Append(ms3); 同上也会报错
ExportShit导出Error:Value cannot be null. (Parameter 'A sheet with the name already exists:测试') at Magicodes.ExporterAndImporter.Excel.ExcelExporter.Append[T](ICollection`1 dataItems, String sheee)
如果改为每次都是不同的sheet就可以
for (int i = 1; i <= writeCount; i++)
{
searchModel.Current = i;
var ms = GetData<ShiftTabelModel>(searchModel, exportSettingModel.SelectDataSql);
var ms3 = ms.Copy();
if(i==1)
excelExporter=excelExporter.Append(ms,"sheet");
else
{
excelExporter=excelExporter.SeparateByRow().Append(ms3,$"sheet{i}");
}
}
1.是否是bug或我设置不对
2.希望后续可以出一个按行来追加的时候可以新增配置选择表头或忽略表头而不是展示空白行
The text was updated successfully, but these errors were encountered:
我试图使用excelExporter.Append().SeparateByRow() 但在循环中
for (int i = 1; i <= writeCount; i++)
{
searchModel.Current = i;
var ms = GetData(searchModel, exportSettingModel.SelectDataSql);
var ms3 = ms.Copy();
if(i==1)
excelExporter=excelExporter.Append(ms);
else
{
The text was updated successfully, but these errors were encountered: