本帖最后由 Richard.Ma 于 2021-12-2 12:20 编辑
用下面的代码进行了多线程测试,没有能重现你说的问题,请上传一个demo来重现问题,
- Task creatsheet = new Task(() => {
- Console.WriteLine("start");
- SheetView sheet = new SheetView();
- sheet.Rows.Count = 3000;
- sheet.Columns.Count = 300;
- Random rnd = new Random();
- for (int r = 0; r < 3000; r++)
- {
- for (int c = 0; c < 300; c++)
- {
- sheet.SetValue(r, c, rnd.Next(r - c, r + c));
- }
- }
- var filename= Environment.CurrentDirectory + "\" + DateTime.Now.ToString("hh-mm-ss.fff") + ".txt";
- sheet.SaveTextFile(filename,true );
- Console.WriteLine("complete");
- });
复制代码
|