-
Jun 29th, 2014, 11:32 AM
#1
Thread Starter
Junior Member
Tabulation down or space
Good morning, friends of the forum.
I am conducting an application in visual studio 2010 framework 4. should create a delimited text file just for quotation and separate quotation mark between a mark for tabulation. so far everything is fine.
but I require a space is not created me or a tabulation at the end of the last quotation mark.
The code:
Code:
Const TXT As String = "D:\EXPORT\file.txt"
Using f As New IO.StreamWriter(TXT, True)
Dim col As String = ""
For Each c As DataGridViewColumn In DataGridView1.Columns
Next
Dim row As String = ""
Dim i As Integer = 0
For Each r As DataGridViewRow In DataGridView1.Rows
For Each c As DataGridViewColumn In DataGridView1.Columns
row = row & "'" & Convert.ToString(r.Cells(c.HeaderText).Value) & "' "
Next
If i < DataGridView1.Rows.Count - 1 Then row &= Environment.NewLine
Next
f.Write(row)
Here is the picture i have left.
https://www.dropbox.com/s/uxws61h1tm...2003.43.32.png
and here the way it should be.
https://www.dropbox.com/s/75cw6kkzek...2003.48.22.png
the detail is in removing the last tabulation after the last quotation mark.
i use
make separations between the quotation marks
Thank you
Last edited by karlosc; Jun 29th, 2014 at 03:05 PM.
-
Jun 29th, 2014, 03:13 PM
#2
Thread Starter
Junior Member
Re: Tabulation down or space
i used the RTrim funtion, but it takes me to the last room after the quotation marks, but between the quotation i have marked out of space.
-
Jun 29th, 2014, 03:24 PM
#3
Thread Starter
Junior Member
Re: Tabulation down or space
Code:
row = row & RTrim("'" & Convert.ToString(r.Cells(c.HeaderText).Value) & "' ")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|