Results 1 to 20 of 20

Thread: Save listview to txt file

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2006
    Posts
    62

    Save listview to txt file

    I need to save a listview to a txtfile. I want to save with a CD too.

  2. #2
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Save listview to txt file

    This will create a text file that will include the SubItems:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4. Dim lvwItem As MSComctlLib.ListItem
    5. Dim a As Long, b As Long
    6. Dim strText As String
    7.  
    8.     With ListView1
    9.         .View = lvwReport
    10.         With .ColumnHeaders
    11.             .Clear
    12.             For a = 1 To 4
    13.                 .Add , "_" & a, "Col " & a, (ListView1.Width * 0.99) / 4
    14.             Next a
    15.         End With
    16.         With .ListItems
    17.             .Clear
    18.             For a = 1 To 15
    19.                 Set lvwItem = .Add(, "_" & a, "Item " & a)
    20.                 For b = 1 To 3
    21.                     lvwItem.SubItems(b) = a & "SubText " & b
    22.                 Next b
    23.             Next a
    24.         End With
    25.    
    26.     End With
    27.  
    28.     Open "c:\TextBox.txt" For Output As #1
    29.  
    30.     With ListView1
    31.         With .ListItems
    32.             For a = 1 To .Count
    33.                 Set lvwItem = .Item(a)
    34.                 strText = strText & lvwItem.Text & ", "
    35.                 For b = 1 To 3
    36.                     strText = strText & lvwItem.SubItems(b) & ", "
    37.                 Next b
    38.                 strText = Left(Trim(strText), Len(Trim(strText)) - 1)
    39.                 Print #1, strText
    40.                 strText = ""
    41.             Next a
    42.         End With
    43.     End With
    44. Close #1
    45.  
    46. End Sub
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2006
    Posts
    62

    Re: Save listview to txt file

    No, like save the file, as if you were to open one with Command Dialog, just save the contents of the listview instead.

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Save listview to txt file

    That's what the examples do.. the Common Dialog only gets the file name for you (use .ShowSave to show the Save As dialog), you need to write the code (which ZenDisaster and MarkGambo have done) to actually save the file.

    Simply change the 'Open' line in the examples above to use the filename that you get from the dialog (instead of App.Path & "\save.txt" or "c:\TextBox.txt").

  5. #5
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Save listview to txt file

    Hi

    I don't think there is an automatic way to save listview data. You will need to extract each piece of information and write it out to a file. The common dialog does nothing but provide a convenient way for the user to select a filename ... the actual saving is up to you.

    Note: I Might be wrong....
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  6. #6
    Frenzied Member the182guy's Avatar
    Join Date
    Nov 2005
    Location
    Cheshire, UK
    Posts
    1,473

    Re: Save listview to txt file

    Quote Originally Posted by koolsid
    Note: I Might be wrong....
    your absolutely right.

    anyway the code is above to save it
    Chris

  7. #7
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: Save listview to txt file

    Here is an example with the CDL Control:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4. On Error GoTo Command1_Click_Error
    5.  
    6. Dim lvwItem As MSComctlLib.ListItem
    7. Dim a As Long, b As Long
    8. Dim strText As String
    9. Dim intSubColCount As Integer
    10.  
    11. intSubColCount = 3
    12.  
    13.     With ListView1
    14.         .View = lvwReport
    15.         With .ColumnHeaders
    16.             .Clear
    17.             For a = 1 To intSubColCount + 1
    18.                 .Add , "_" & a, "Col " & a, (ListView1.Width * 0.99) / 4
    19.             Next a
    20.         End With
    21.         With .ListItems
    22.             .Clear
    23.             For a = 1 To 15
    24.                 Set lvwItem = .Add(, "_" & a, "Item " & a)
    25.                 For b = 1 To intSubColCount
    26.                     lvwItem.SubItems(b) = a & "SubText " & b
    27.                 Next b
    28.             Next a
    29.         End With
    30.     End With
    31.  
    32.     With CommonDialog1
    33.         .CancelError = True
    34.         .InitDir = "C:\"
    35.         .DialogTitle = "Select Text File Name"
    36.         .FileName = "SaveText.Txt"
    37.         .Filter = "Text (*.txt) | *.txt"
    38.         .ShowSave
    39.         If Len(Trim(.FileName)) = 0 Then Exit Sub
    40.         Open .FileName For Output As #1
    41.     End With
    42.  
    43.     With ListView1
    44.         With .ListItems
    45.             For a = 1 To .Count
    46.                 strText = ""
    47.                 Set lvwItem = .Item(a)
    48.                 strText = strText & lvwItem.Text & ","
    49.                 For b = 1 To 3
    50.                     strText = strText & lvwItem.SubItems(b) & ","
    51.                 Next b
    52.                 strText = Left(Trim(strText), Len(Trim(strText)) - 1)
    53.                 Print #1, strText
    54.             Next a
    55.         End With
    56.     End With
    57. Close #1
    58.  
    59. On Error GoTo 0
    60. Exit Sub
    61.  
    62. Command1_Click_Error:
    63. If Err.Number = 32755 Then
    64.     Exit Sub 'User pressed Cancel on CDL
    65. Else
    66.     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form Form1"
    67. End If
    68.  
    69. End Sub
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


  8. #8

    Thread Starter
    Member
    Join Date
    Aug 2006
    Posts
    62

    Re: Save listview to txt file

    Quote Originally Posted by Mark Gambo
    Here is an example with the CDL Control:

    VB Code:
    1. Option Explicit
    2.  
    3. Private Sub Command1_Click()
    4. On Error GoTo Command1_Click_Error
    5.  
    6. Dim lvwItem As MSComctlLib.ListItem
    7. Dim a As Long, b As Long
    8. Dim strText As String
    9. Dim intSubColCount As Integer
    10.  
    11. intSubColCount = 3
    12.  
    13.     With ListView1
    14.         .View = lvwReport
    15.         With .ColumnHeaders
    16.             .Clear
    17.             For a = 1 To intSubColCount + 1
    18.                 .Add , "_" & a, "Col " & a, (ListView1.Width * 0.99) / 4
    19.             Next a
    20.         End With
    21.         With .ListItems
    22.             .Clear
    23.             For a = 1 To 15
    24.                 Set lvwItem = .Add(, "_" & a, "Item " & a)
    25.                 For b = 1 To intSubColCount
    26.                     lvwItem.SubItems(b) = a & "SubText " & b
    27.                 Next b
    28.             Next a
    29.         End With
    30.     End With
    31.  
    32.     With CommonDialog1
    33.         .CancelError = True
    34.         .InitDir = "C:\"
    35.         .DialogTitle = "Select Text File Name"
    36.         .FileName = "SaveText.Txt"
    37.         .Filter = "Text (*.txt) | *.txt"
    38.         .ShowSave
    39.         If Len(Trim(.FileName)) = 0 Then Exit Sub
    40.         Open .FileName For Output As #1
    41.     End With
    42.  
    43.     With ListView1
    44.         With .ListItems
    45.             For a = 1 To .Count
    46.                 strText = ""
    47.                 Set lvwItem = .Item(a)
    48.                 strText = strText & lvwItem.Text & ","
    49.                 For b = 1 To 3
    50.                     strText = strText & lvwItem.SubItems(b) & ","
    51.                 Next b
    52.                 strText = Left(Trim(strText), Len(Trim(strText)) - 1)
    53.                 Print #1, strText
    54.             Next a
    55.         End With
    56.     End With
    57. Close #1
    58.  
    59. On Error GoTo 0
    60. Exit Sub
    61.  
    62. Command1_Click_Error:
    63. If Err.Number = 32755 Then
    64.     Exit Sub 'User pressed Cancel on CDL
    65. Else
    66.     MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form Form1"
    67. End If
    68.  
    69. End Sub
    Thanks, it works. But when I save it, there are three commas like this ,,, at the end of each line.

  9. #9
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Re: Save listview to txt file

    Hi, I have tried the code given by Mark Gambo, that one with the CDL control. It's not work for me. It gives weird result. May i know what is the problem? Need help, please...

    My listview is suppose as shown in below but the texfile gives weird result as shown below:

    Code:
    Option Explicit
    
    Private Sub Form_Load()
     ' Set the View
    ListView1.View = lvwReport
    ' Add the columns
    
    With ListView1.ColumnHeaders
        .Add , , "Latitude"
        .Add , , "Longitude"
        .Add , , "Time"
    End With
    
    End Sub
    
    Private Sub Command1_Click()
    With ListView1.ListItems
       
        .Add , , Text1.Text 'add the latitude
        
    End With
    
    With ListView1
        
        .ListItems(ListView1.ListItems.Count).SubItems(1) = Text2.Text
        
        .ListItems(ListView1.ListItems.Count).SubItems(2) = Time
    
    End With
    
    End Sub
    
    
    
     
    Private Sub Command2_Click()
    On Error GoTo Command1_Click_Error
     
    Dim lvwItem As MSComctlLib.ListItem
    Dim a As Long, b As Long
    Dim strText As String
    Dim intSubColCount As Integer
     
    intSubColCount = 3
     
        With ListView1
            .View = lvwReport
            With .ColumnHeaders
                .Clear
                For a = 1 To intSubColCount + 1
                    .Add , "_" & a, "Col " & a, (ListView1.Width * 0.99) / 4
                Next a
            End With
            With .ListItems
                .Clear
                For a = 1 To 15
                    Set lvwItem = .Add(, "_" & a, "Item " & a)
                    For b = 1 To intSubColCount
                        lvwItem.SubItems(b) = a & "SubText " & b
                    Next b
                Next a
            End With
        End With
     
        With CommonDialog1
            .CancelError = True
            .InitDir = "C:\"
            .DialogTitle = "Select Text File Name"
            .FileName = "SaveText.Txt"
            .Filter = "Text (*.txt) | *.txt"
            .ShowSave
            If Len(Trim(.FileName)) = 0 Then Exit Sub
            Open .FileName For Output As #1
        End With
     
        With ListView1
            With .ListItems
                For a = 1 To .Count
                    strText = ""
                    Set lvwItem = .Item(a)
                    strText = strText & lvwItem.Text & ","
                    For b = 1 To 3
                        strText = strText & lvwItem.SubItems(b) & ","
                    Next b
                    strText = Left(Trim(strText), Len(Trim(strText)) - 1)
                    Print #1, strText
                Next a
            End With
        End With
    Close #1
     
    On Error GoTo 0
    Exit Sub
     
    Command1_Click_Error:
    If Err.Number = 32755 Then
        Exit Sub 'User pressed Cancel on CDL
    Else
        MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form Form1"
    End If
     
    End Sub
    I have post my code as well.
    Attached Images Attached Images   
    I'm still on the path of learning....

  10. #10
    Frenzied Member
    Join Date
    Nov 2005
    Posts
    1,834

    Re: Save listview to txt file

    That's not a weird result. Mark Gambo's example first loads data into the Listview (overwriting the existing data) and then saves it to a text file. Remove the part of the code that loads the data into the Listview.

    Try this.

    Code:
    Private Sub Command2_Click()
    On Error GoTo Command1_Click_Error
     
    Dim lvwItem As MSComctlLib.ListItem
    Dim a As Long, b As Long
    Dim strText As String
    Dim FF As Integer
     
        With CommonDialog1
            .CancelError = True
            .InitDir = "C:\"
            .DialogTitle = "Select Text File Name"
            .FileName = "SaveText.Txt"
            .Filter = "Text (*.txt) | *.txt"
            .ShowSave
            If Len(Trim(.FileName)) = 0 Then Exit Sub
            FF = FreeFile
            Open .FileName For Output As #FF
        End With
     
        With ListView1
            With .ListItems
                For a = 1 To .Count
                    strText = ""
                    Set lvwItem = .Item(a)
                    strText = strText & lvwItem.Text & ","
                    For b = 1 To 2
                        strText = strText & lvwItem.SubItems(b) & ","
                    Next b
                    strText = Left(Trim(strText), Len(Trim(strText)) - 1)
                    Print #FF, strText
                Next a
            End With
        End With
    Close #FF
     
    On Error GoTo 0
    Exit Sub
     
    Command1_Click_Error:
    If Err.Number = 32755 Then
        Exit Sub 'User pressed Cancel on CDL
    Else
        MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form Form1"
    End If
     
    End Sub
    Last edited by Chris001; Jan 5th, 2009 at 12:50 PM.

  11. #11
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Re: Save listview to txt file

    Thanks a lot, Chris001. You solved my problems. I'm kinda new to listview feature in VB. Anyway, thanks again.
    I'm still on the path of learning....

  12. #12
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Re: Save listview to txt file

    Hi, i'm using the Chris001's code which is saving the listview items in the text file and it works. But there is one minor problem, when i click the button for saving, there is common dialog box pop up, if i don't want to save it and i click cancel, it does exit the common dialog. But there will always a null text file created in my app folder. What is the problem? Although this is does not create failure/error to my program, but i just wondering why this happened.
    I'm still on the path of learning....

  13. #13
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Save listview to txt file

    Quote Originally Posted by cheowkwen
    Hi, i'm using the Chris001's code which is saving the listview items in the text file and it works .... But there will always a null text file created in my app folder. What is the problem? Although this is does not create failure/error to my program, but i just wondering why this happened.
    I doubt the file is being created by the code posted. If the user hits cancel, then the routine exits the function without creating a file. I think one of these things might apply:
    1) You are using On Error Resume Next in the function
    2) the file was already there
    3) the file is being created by some other part of your project.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  14. #14
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Re: Save listview to txt file

    Hi, LaVolpe. I know what is the problem. I have set the .cancelerror to false. Therefore, it will always a null text file created at my app folder. But if i set it to true, when i click cancel, a error message pop up with error number 32755. However, based on my understanding of Chris001's code, if this error happens, it should exit sub, that mean there were no error message pop up and exit the common dialog even though i have set the .cancelerror to true.Am i right?
    I'm still on the path of learning....

  15. #15
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Save listview to txt file

    Did you remove his original On Error GoTo statement?

    You can tweak his code a little if you like.
    Code:
    Private Sub Command2_Click()
     
    Dim lvwItem As MSComctlLib.ListItem
    Dim a As Long, b As Long
    Dim strText As String
    Dim FF As Integer
    
        On Error Resume Next ' slight change here
        With CommonDialog1
            .CancelError = True
            .Flags = cdlOFNPathMustExist Or cdlOFNExplorer Or cdlOFNOverwritePrompt
                       ' ^^ else you need to check yourself and create a path if necessary
            .InitDir = "C:\" 
             ' ^^ optional; can take line out & dialog will go to folder last visited
            .DefaultExt = "txt"  
            '  ^^ this will append txt to the filename if user doesn't provide it
            .DialogTitle = "Select Text File Name"
            .FileName = "SaveText.Txt"
            ' ^^ optional; can take line out or even use .FileName = ""
            .Filter = "Text (*.txt) | *.txt"
        End With
    
        CommonDialog1.ShowSave
        If Err Then ' user pressed cancel button
             Err.Clear
             Exit Sub
        End If
    
        On Error GoTo Command1_Click_Error
        FF = FreeFile
        Open CommonDialog1.FileName For Output As #FF
        ' if an error occurs in line above; file is locked and cannot be overwritten
        ' or drive/device is not ready, other potential errors possible
        
        ' add your listview save routine here
        With ListView1
               ...
         End With
    
         Close #FF
         FF = 0
    
    Command1_Click_Error:
    If Err Then
       ' error here can mean out of disk space, error in your save loop, other errors
       ' the err.description will help explain it
        If FF Then Close #FF
        MsgBox "Error " & Err.Number & " (" & Err.Description & ") in procedure Command1_Click of Form Form1"
         Err.Clear
    End If
    End Sub
    Last edited by LaVolpe; Jan 17th, 2009 at 10:46 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  16. #16
    New Member
    Join Date
    Jan 2009
    Posts
    14

    Re: Save listview to txt file

    Hi, LaVolpe. I having the same problem with cheowkwen. It always create a null txt file in the app folder. I have played around with your code. It solved the null text file and finally I get to know what is problem that caused the null text file. Thanks a lot. Thanks for cheowkwen as well to bring up this matter.
    Last edited by log85; Jan 17th, 2009 at 10:44 PM.

  17. #17
    Hyperactive Member
    Join Date
    Dec 2008
    Posts
    282

    Re: Save listview to txt file

    LaVolpe,

    The problem is at the On Error GoTo statement?! I got it!! I have tried to tweak the code as what you taught and it solved the problem. Thanks for your help, LaVolpe.

    Thanks for cheowkwen as well to bring up this matter.

    You are welcome, log85. We are just learning from each others.
    I'm still on the path of learning....

  18. #18
    Hyperactive Member
    Join Date
    Feb 2009
    Posts
    313

    Re: Save listview to txt file

    Just to avoid opening a new thread,I'll ask my question here.I hope that's OK.
    I have a similar problem.I can save data from listview to .txt file,but I would also like to save the ColumnHeaders,so my saved txt file would look something like this:

    NAME SURNAME AGE
    xxxx yyyyyy zzzz


    This is my code:

    Code:
    Private Sub cmdExport_Click()
    Dim lvwItem As MSComctlLib.ListItem
    Dim x As Long, y As Long
    Dim StringTekst As String
    Dim TT As Integer
    
    
        On Error Resume Next
        With CommonDialog1
            .CancelError = True
            .InitDir = "C:\"
            .DialogTitle = "Izaberi Ime Za Fajl"
            .FileName = "Spremi me.txt"
            .Filter = "Text (*.txt) | *.txt"
            End With
            
            CommonDialog1.ShowSave
            If Err Then
            Err.Clear
            Exit Sub
            End If
            
            On Error GoTo Command1_ClickError
            TT = FreeFile
            Open CommonDialog1.FileName For Output As #TT
            
            
            
            With ListView1
                With .ListItems
                For x = 1 To .Count
                StringTekst = ""
                Set lvwItem = .Item(x)
                StringTekst = StringTekst & lvwItem.Text & " "
                For y = 1 To 8
                StringTekst = StringTekst & lvwItem.SubItems(y) & " "
                Next y
                StringTekst = Left(Trim(StringTekst), Len(Trim(StringTekst)) + 1)
                Print #TT, StringTekst
                Next x
                End With
                End With
                Close #TT
                TT = 0
                
                On Error GoTo 0
                Exit Sub
    Code:
    Command1_ClickError:
                If Err Then
                If TT Then Close #TT
                MsgBox "Error " & Err.Number & " (" & Err.Description & ") u proceduri na formi"""
                Err.Clear
                
                End If
                End Sub

  19. #19
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Save listview to txt file

    There is nothing wrong with starting a new thread. If the original author subscribed to this thread, then they are getting email notifications each time this post is replied to; not really fair to them.

    The listview column headers can be looped thru just like the listview contents.
    Code:
    For X = 1 To ListView1.ColumnHeaders.Count
         Print #TT, ListView1.ColumnHeaders(x).Text; ","; ListView1.ColumnHeaders(x).Width 
         ' you can make the header attributes comma delimited or separate entries as desired
    Next
    If storing this to same file as the listview items, you may want to add markers in your text file to indicate where columnheaders start/end and where the listivew items start. This way when you read them back, you know what your text file's input line refers to.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  20. #20
    Hyperactive Member
    Join Date
    Feb 2009
    Posts
    313

    Re: Save listview to txt file

    Thank you for your reply.The code you gave me works fine,as long as I want to keep the ColumnHeaders under the listview items.

    If I try to save the headers before(above-just like in ListView) the items,it all looks so messed up.
    I wouldn't like you to write the code for me,but if you could point me in the right direction,I would be grateful.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width