I use this code to produce a csv file from a listview...
can someone help me do some tweaks on the code to enable me to produce a csv from lvChecked and from another listview. It would be like merging the contents of two listview in a single csv file.
Thank you so much!Code:SaveFileDialog1.ShowDialog() Using csvFile As New System.IO.StreamWriter(SaveFileDialog1.FileName + ".csv") For Each lstItem As ListViewItem In lvChecked.Items csvFile.WriteLine(String.Format("{0},{1},{2},{3},{4},{5},{6},{7}", lstItem .Text, lstItem .SubItems(0).Text, lstItem .SubItems(1).Text, lstItem .SubItems(2).Text, lstItem .SubItems(3).Text, lstItem .SubItems(4).Text, "MISSING", Format(Now, "dd/MM/yyyy"))) Next MessageBox.Show("Successful") End Using




Reply With Quote
