REST url sorting works in browser, not in excel

Hi all,
I am having an odd issue Im not sure how to proceed with. Let me start with saying I am relatively new to rest. But anyways, I are attempting to pull data from a BAQ and have it automatically sorted. We have a working work around using some sql calls but I would rather know what is happening. I also have it sorting on the BAQ level. My url is this:
http://MYSERVER/EpicorERP/api/v1/BaqSvc/ControlTower?$sort=Customer_CustID:asc

Which works if pasted directly into my browser, but attempting to use it in excel brings up unsorted results. I am pulling in data in excel by (starting at excels ribbon) going to Data->From Other Connections → Odata. Anyone have an idea why the sorting isnt being applied in excel? Is this the wrong way to go about it?
Thanks for any help!

If that exact url works in the browser, and you are using that exact url in excel, then excel is
receiving sorted data.

That would mean excel is doing it’s own sort after the fact.

1 Like

Unfortunately, Excel is doing its own logic - it removes everything in query string and creates its own…
Non-cloud customers can look into IIS log and see how exacly URL looks like.

That’s even more unfortunate.

Thank you both for confirming that, that is unfortunate. I always wish I could know the context of design decisions like these.

This one is easy, it’s Microsoft.

A: “Hey, this ODATA standard is neat.”
B: “Yeah it has built in sorting, and you can do it right in the url.”

A: “Cool, we’ll use it, but we’ll disregard what the user specifically asked for.”
B: “Like bring it back to base?”
A: “Yes”

B: “But we need to sort, they wanted to sort.”
A: “Yes, but we want to do it our way.”

B: “Well how will we do it?”
A: “We’ll use the same exact way. We’ll just make them define it somewhere else.”
B: “Will it at least be obvious?”
A: “Of course not, where do we work again?”
B: “Oh yeah, I’m sorry.”