Write content of a DataGridView to a CSV file.

Namespace: ExpSuite
Assembly: FrameWork (in FrameWork.exe) Version: 0.10.2.0

Syntax

Visual Basic
Public Function WriteDGV ( _
	szFile As String, _
	dgvSource As DataGridView, _
	pbStatus As ProgressBar _
) As String

Parameters

szFile
Type: System..::..String
File Name of the new CSV file.
dgvSource
Type: System.Windows.Forms..::..DataGridView
DataGridView object containing data.
pbStatus
Type: System.Windows.Forms..::..ProgressBar
Progress bar to show the progress of parsing.

Return Value

Error message, empty if no error ocured.

Remarks

Rules (if " is Quota and , is Separator):
  • row : cell,cell,cell
  • cell:
  • abcdef -> abcdef
  • abc,def -> "abc,def"
  • "abcdef -> """abcdef"
  • abc",def -> "abc"",def"
  • ab,cd,"ef -> "ab,cd""ef"
  • See Also