donnytian / Npoi.Mapper

Use this tool to import or export data with Excel file. The tool is a convention based mapper between strong typed object and Excel data via NPOI.
MIT License
589 stars 114 forks source link

Multithreading error #104

Closed hongwei7458 closed 12 months ago

hongwei7458 commented 2 years ago

get data from other server whith parallel.ForEach, i have an error

code: Parallel.ForEach(list, async item =>{ var temp= await getdata(item); mapper.Put(temp, "sheet_"+item, false); })

error:NPOI.POIXMLException

NullReferenceException: Object reference not set to an instance of an object.

donnytian commented 2 years ago

sounds like an NPOI exception, I am not sure if NPOI supports multi-thread writing.