can you help me? I am trying to make a filter in a file .csv and save the result in a new file csv , but on having save this table he save the table completes not the filtered results. A Greeting. Thank you.
You should create a new table, and copy all the filtered rows in the old table to the new table (row by row).
copy table Hi! I am trying to do something similar but cannot work out how to copy the old table to the new table row by row, any help? Dave.
Hi davelew1s, since you can't copy a complete row directly, you have to copy cell by cell: Code: Sub GlobalsEnd SubSub App_Start ' defining both tables with the same columns Table1.AddCol(cString,"Col1",50,False) Table1.AddCol(cString,"Col2",50,False) Table2.AddCol(cString,"Col1",50,False) Table2.AddCol(cString,"Col2",50,False) ' adding six rows to table1 Table1.AddRow("row1","value1") Table1.AddRow("row2","value2") Table1.AddRow("row3","value1") Table1.AddRow("row4","value2") Table1.AddRow("row5","value1") Table1.AddRow("row6","value2") ' setting a filter => three rows left Table1.Filter("Col2 = 'value2'") ' copy filtered rows from table1 to table2 (cell by cell) Table2.Clear For i = 0 To Table1.RowCount - 1 Table2.AddRow() For j = 0 To Table1.ColCount - 1 Table2.Cell(Table2.ColName(j),i) = Table1.Cell(Table1.ColName(j),i) Next Next Form1.ShowEnd Sub specci48