How to keep insertion order in the Spreadsheet table columns?

In the RequestData method of my Python plugin, I fill a VTKTable by columns: one column for each dataset:

from vtkmodules.numpy_interface import dataset_adapter

def RequestData(self, request, inInfoVector, outInfoVector):
    output = dataset_adapter.WrapDataObject(vtkTable.GetData(outInfoVector, 0))
    # my_data is a dict for dataset name - dataset value mapping
    for field_name, field_values in my_data.items():
        output.FieldData.append(field_values, field_name)
    return 1

The problem is that the order in which I add the fields is not conserved in the SpreadSheet View: they are reordered alphabetically. How can I tell the SpreadSheet View to respect the insertion order?

It appears to be explicitly disabled here. Enabling it allows me to drag columns around without issue, so I’m not sure why it is disabled.

Until it is enabled, there’s no way to programmatically reorder columns (as opposed to users choosing the order) either. Once it is enabled, this explains how the column order might be set up programmatically.

I agree it would be nice if filters could provide hints for preferred column orderings and visibility; the UI could provide a combo-box for resetting things to different choices (alphabetical, insertion order, filter suggestions, user “saves,” etc.). But first, we would need to understand if there was a technical reason column reordering was forced off.

Then it explains why I got the same behaviour with the built-in CSV reader of ParaView.

Once it is enabled, this explains how the column order might be set up programmatically.

I would rather prefer that there was a built-in option in ParaView, like sorting, that enables the user to choose alphabetical sorting, no sorting (i.e. insertion order conserved), etc. Otherwise, one would have to build ParaView himself and adding PySide6 (or whatever Python Qt bindings are supported in ParaView).

Why is this feature important in my opinion? Because some field data (columns in the SpreadSheet View) are more important than others in domain-specific applications. So it makes sense to me to let the user provide the more relevant columns first.