Libreoffice calc data refresh column order and calculated columns

We have a libreoffice base database connection to a sql server instance. We’ve created a query which selects data from a table and have it populating into a libre office calc sheet. We want to know if it’s possible to re-arrange the columns in the calc sheet and then keep the ordering when we do a data refresh similar to how excel works? We also want to know if it’s possible for us to add calculated columns to the calc sheet and keep those columns on the sheet when we data refresh?

Hello,

Do not see a method precisely as you state - move columns and retain after refresh. But why not just create the query to output the sequence you actually want.

Calculated columns should not be affected with a refresh if outside of the query range.

Thank you for answering. I’m new to calc. Will you please elaborate on what is meant by “outside of the query range”?

When you import data from a table or query, a Range is established with Col & Row area it occupies. The number of columns and rows is dependent upon the query result itself. So if you are selecting four fields in a query, it will occupy four columns and the number of records returned by the query will be the number of rows occupied. The is the Range for the query.

If you modify the query to five fields, now the Range will be expanded to a fifth column.

So you must insure your calculated fields will not be within any portion the query may occupy.