Are you looking for a function in the script part?
Maybe a LOAD format specification filter may help you (this one is created using the QV script editor, I think it should also work with QS):
[C:\Users\s.wuehl\Downloads\Pet Owners survey TEST.xlsx]
(ooxml, embedded labels, table is [Raw data], filters(
Or are you looking for something completely different?
Sure, you can use CROSSTABLE Load prefix.
Though it's not the exact same as Transpose() filter, i.e. it won't pivot the complete input table.
Not sure what you are trying to achieve.