Exporting datagridview to csv file

后端 未结 8 1832
南方客
南方客 2020-11-29 10:11

I\'m working on a application which will export my DataGridView called scannerDataGridView to a csv file.

Found some example code to do this, but can\'t get it worki

8条回答
  •  一向
    一向 (楼主)
    2020-11-29 10:50

    I think this is the correct for your SaveToCSV function : ( otherwise Null ...)

     for (int i = 0; i < columnCount; i++)
    

    Not :

     for (int i = 1; (i - 1) < DGV.RowCount; i++)
    

提交回复
热议问题