Toine Posted January 14, 2007 Share 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 Link to comment Share on other sites More sharing options...
Valuater Posted January 14, 2007 Share 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) Link to comment Share on other sites More sharing options...
Toine Posted January 15, 2007 Author Share Posted January 15, 2007 Thanks for all, I will try that soon Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now