Click here to Skip to main content
15,909,030 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Anonymous browser Pin
raggabox17-Sep-09 6:59
raggabox17-Sep-09 6:59 
GeneralRe: Anonymous browser Pin
Dave Kreskowiak17-Sep-09 7:23
mveDave Kreskowiak17-Sep-09 7:23 
GeneralRe: Anonymous browser Pin
raggabox17-Sep-09 7:30
raggabox17-Sep-09 7:30 
GeneralRe: Anonymous browser Pin
DJ Matthews17-Sep-09 7:37
DJ Matthews17-Sep-09 7:37 
GeneralRe: Anonymous browser Pin
raggabox17-Sep-09 9:12
raggabox17-Sep-09 9:12 
GeneralRe: Anonymous browser Pin
Dave Kreskowiak17-Sep-09 15:16
mveDave Kreskowiak17-Sep-09 15:16 
QuestionRight Click Menu Pin
led12317-Sep-09 5:37
led12317-Sep-09 5:37 
Questionhow to format [modified] Pin
rbjanaki17-Sep-09 3:05
rbjanaki17-Sep-09 3:05 
hello all,

Finally I could able to save my dynamic array data into text file. But it is not formated it is saving as a big line. I want to format my data into
9 X 9. Can anyone help me please.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton.Click

        Dim cellValue As String, i As Integer
        Dim returnValue As Boolean
        Dim FileWriter As StreamWriter
        Dim results As DialogResult

        results = SaveFileDialog1.ShowDialog

        If results = DialogResult.OK Then
            FileWriter = New StreamWriter(SaveFileDialog1.FileName, False)


            For r As Integer = 1 To 3
                For rr As Integer = 1 To 3
                    For c As Integer = 1 To 3
                        For rc As Integer = 1 To 3

                            cellValue = xx(r, c).rec(rr, rc).Text
                            returnValue = String.IsNullOrEmpty(cellValue)
                            If returnValue = True Then

                                FileWriter.Write("00 ")
                            Else
                                FileWriter.WriteLine(cellValue + " ")

                            End If
                        Next


                        i += 1
                    Next
                Next
            Next
            FileWriter.Close()


        End If
        Me.Close()
    End Sub



I am getting my output like this

8
00 00 00 00 00 00 00 00 00 7
00 13
00 17
00 21
00 00 00 1
00 53
00 51
00 00 00 3
00 00 00 00 00 27
00 00 00 79
00 00 00 49
00 00 00 75
00 00 00 00 00 31
00 00 00 73
00 45
00 47
00 00 00 67
00 63
00 41
00 35
00 00 00 00 00 00 00 00 00 00


but I want to format like

00 00 00 00 00 00 00 00 00
00 07 00 13 00 17 00 21 00
00 00 01 00 53 00 51 00 00
00 03 00 00 00 00 00 27 00
00 00 79 00 00 00 49 00 00
00 75 00 00 00 00 00 31 00
00 00 73 00 45 00 47 00 00
00 67 00 63 00 41 00 35 00
00 00 00 00 00 00 00 00 00

modified on Thursday, September 17, 2009 9:33 AM

AnswerRe: how to format Pin
Luc Pattyn17-Sep-09 4:32
sitebuilderLuc Pattyn17-Sep-09 4:32 
GeneralRe: how to format Pin
rbjanaki17-Sep-09 5:19
rbjanaki17-Sep-09 5:19 
GeneralRe: how to format Pin
Luc Pattyn17-Sep-09 5:34
sitebuilderLuc Pattyn17-Sep-09 5:34 
AnswerRe: how to format Pin
Ian Shlasko17-Sep-09 7:35
Ian Shlasko17-Sep-09 7:35 
GeneralRe: how to format Pin
rbjanaki17-Sep-09 7:52
rbjanaki17-Sep-09 7:52 
QuestionLost on how you would upload a file in VB.net Pin
DJ Matthews17-Sep-09 2:42
DJ Matthews17-Sep-09 2:42 
AnswerRe: Lost on how you would upload a file in VB.net Pin
EliottA17-Sep-09 5:39
EliottA17-Sep-09 5:39 
GeneralRe: Lost on how you would upload a file in VB.net Pin
DJ Matthews17-Sep-09 6:20
DJ Matthews17-Sep-09 6:20 
QuestionProcess Object saying "Access Denied" Pin
specialdreamsin17-Sep-09 1:37
specialdreamsin17-Sep-09 1:37 
AnswerRe: Process Object saying "Access Denied" [modified] Pin
tosch17-Sep-09 2:15
tosch17-Sep-09 2:15 
QuestionDate problem Pin
rmedo17-Sep-09 0:16
rmedo17-Sep-09 0:16 
AnswerRe: Date problem Pin
Ashfield17-Sep-09 1:41
Ashfield17-Sep-09 1:41 
QuestionProblem in using .selection.type Pin
Padma N16-Sep-09 19:54
Padma N16-Sep-09 19:54 
AnswerRe: Problem in using .selection.type Pin
Johan Hakkesteegt16-Sep-09 20:57
Johan Hakkesteegt16-Sep-09 20:57 
GeneralRe: Problem in using .selection.type Pin
Padma N16-Sep-09 21:20
Padma N16-Sep-09 21:20 
GeneralRe: Problem in using .selection.type Pin
Johan Hakkesteegt16-Sep-09 21:44
Johan Hakkesteegt16-Sep-09 21:44 
QuestionVisual Basic KeyBoard Pin
Bob Beaubien16-Sep-09 15:00
Bob Beaubien16-Sep-09 15:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.