In the For - Next loop you use the variable 'n' representing the column index. After each RemoveCol the indexes of the columns change, so when for example n=TblD.ColCount-1, this column doesn't exist any more.
Try this code:
For i=Table1.ColCount-1 To 0 Step -1
Table1.RemoveCol(Table1.ColName(n))
Next
In the program I posted in post #5 with:
For i=0 To Table1.ColCount-1
Table1.RemoveCol("Test"&i+1)
Next
it works because I remove the columns by their name and not by their column index.
Quote:
Well I decided to switch to csv files and loadCSV as method.
Then the width of a table is settable then. So I guess it is a bug.
|
I don't know why you couldn't resize the column width in your program. In the sample program in post #5 it works also with XML files !
Best regards.