I am struggling to find a way to write text file with various fixed length fields from a dataset
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      
Me.ExportTableAdapter.Fill(Me.NewDataSet.Export)
'write to text file
Dim sw As New System.IO.StreamWriter("C:\temp\FixedWidth.txt")
Dim city As System.Text.StringBuilder
every method ive used simply writes all the data without spacing or i have seen methods using csv, but thats not what im after either
i need to identify each column and assign it a set width e.g. first_name (20 spaces) surname (30 spaces)
any helps appeciated
	
		
			
		
		
	
				
			Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ExportTableAdapter.Fill(Me.NewDataSet.Export)
'write to text file
Dim sw As New System.IO.StreamWriter("C:\temp\FixedWidth.txt")
Dim city As System.Text.StringBuilder
every method ive used simply writes all the data without spacing or i have seen methods using csv, but thats not what im after either
i need to identify each column and assign it a set width e.g. first_name (20 spaces) surname (30 spaces)
any helps appeciated
 
	 
 
		 
 
		