Toine 0 Posted January 14, 2007 Is there a single way to load a Comma Separated File into a ListView for example the file contains this 3 lines a1,b1,c1,d1 a2,b2,c2,d2 a3,b3,c3,d3 And I want one value per cell. Col1 Col2 Col3 Col4 a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 In the same way is there a single way to save the contents of a ListView in et CVS file. Thanks for your help Share this post Link to post Share on other sites
Valuater 129 Posted January 14, 2007 maybe... expandcollapse popup#include <GUIConstants.au3> GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES) GUISetBkColor (0x00E0FFFF) ; will change background color $listview = GUICtrlCreateListView ("col1|col2|col3|col4",10,10,200,150);,$LVS_SORTDESCENDING) $button = GUICtrlCreateButton ("Exit",75,170,70,20) GUISetState() ; READ YOUR DATA FROM A FILE ; _FileReadToArray() - see help ; for this demo Dim $File_Read[4] Dim $list_Item[UBound($File_Read)] $File_Read[1] = "a1,b1,c1,d1" $File_Read[2] = "a2,b2,c2,d2" $File_Read[3] = "a3,b3,c3,d3" for $x = 1 to UBound($File_Read) - 1 $info = StringReplace($File_Read[$x], ",", "|") $list_Item[$x] = GUICtrlCreateListViewItem( $info,$listview) Next Do $msg = GUIGetMsg () Select Case $msg = $button Exit Case Else ; EndSelect Until $msg = $GUI_EVENT_CLOSE 8) Share this post Link to post Share on other sites
Toine 0 Posted January 15, 2007 Thanks for all, I will try that soon Share this post Link to post Share on other sites