the previous code was skipping hidden columns, however we have a widths array that relies on column index and it became out of sync when a hidden column is skipped because the indexes no longer matches the column widths indexes when it is used in the next for loop
widths
array that relies on column index and it became out of sync when a hidden column is skipped because the indexes no longer matches the column widths indexes when it is used in the next for loop