ExcelReadHelperProcessLargeExcelStreamingWithProgressAsync 方法

带状态反馈的流式处理方法

Definition

命名空间: Suresking.Utility
程序集: Suresking.Utility (在 Suresking.Utility.dll 中) 版本:1.3.22+a27276bb8ffde055e69ff608e98aafba279e1e99
C#
public static Task<int> ProcessLargeExcelStreamingWithProgressAsync(
	string filePath,
	int headerRows,
	Func<List<Dictionary<string, string>>, Task> rowProcessor,
	int batchSize = 1000,
	IProgress<string>? statusProgress = null,
	IProgress<int>? rowProgress = null,
	CancellationToken cancellationToken = default
)

参数

filePath  String

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="filePath"/> 文档]

headerRows  Int32

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="headerRows"/> 文档]

rowProcessor  FuncListDictionaryString, String, Task

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="rowProcessor"/> 文档]

batchSize  Int32  (Optional)

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="batchSize"/> 文档]

statusProgress  IProgressString  (Optional)

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="statusProgress"/> 文档]

rowProgress  IProgressInt32  (Optional)

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="rowProgress"/> 文档]

cancellationToken  CancellationToken  (Optional)

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <param name="cancellationToken"/> 文档]

返回值

TaskInt32

[缺少 "M:Suresking.Utility.ExcelReadHelper.ProcessLargeExcelStreamingWithProgressAsync(System.String,System.Int32,System.Func{System.Collections.Generic.List{System.Collections.Generic.Dictionary{System.String,System.String}},System.Threading.Tasks.Task},System.Int32,System.IProgress{System.String},System.IProgress{System.Int32},System.Threading.CancellationToken)" 的 <returns> 文档]

参见