回复 1楼jplzj的帖子
使用 Spread 7.0V4:
空表这边测试耗时一毫秒。
加载 50万*20列的数据使用1752毫秒。
- private void Form1_Load(object sender, EventArgs e)
- {
- this.fpSpread1.ActiveSheet.RowCount = 0;
- dt = new DataTable();
- for (int i = 0; i < 20; i++)
- {
- dt.Columns.Add("Col"+i.ToString());
- }
- for (int i = 0; i < 500000; i++)
- {
- dt.Rows.Add("test", "test", "test", "test", "test", "test", "test"
- , "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test", "test");
- }
- }
- private void setRowcountToolStripMenuItem_Click(object sender, EventArgs e)
- {
- Stopwatch st = new Stopwatch();
- st.Start();
- this.fpSpread1.SuspendLayout();
- //this.fpSpread1.ActiveSheet.RowCount = 500000;
- this.fpSpread1.DataSource = dt;
- this.fpSpread1.ResumeLayout();
- st.Stop();
- MessageBox.Show(st.ElapsedMilliseconds.ToString());
- }
复制代码 |