sio / LibPQ

Detach your M code from workbooks to reuse it! Import modules from local or web storage (unlimited number of sources)
Apache License 2.0
76 stars 21 forks source link

Add functions for moving columns to beginning/end of table #21

Closed ckp95 closed 3 years ago

ckp95 commented 3 years ago

These are two fairly simple functions I use a lot. The GUI can do these things, but the generated code is unwieldy because it hardcodes all of the columns in the query, rather than just the ones that are being moved. So if you amend previous steps so that the table has different columns, the code generated by the GUI will break.

Wasn't really sure if they are welcome in this project but it only took me 10 minutes to write tests for, so I thought why not.

sio commented 3 years ago

Thank you!

The code looks very nice and I'm happy to see someone (except me) writing unit tests for Power Query :-)

Merged after minor whitespace cleanup.