Moving Columns in Excel

Started by dcrane37, January 29, 2019, 08:10:17 AM

Previous topic - Next topic

dcrane37

Hello!

Anyone have any luck moving columns in Excel. I have been trying to rearrange the data in a worksheet before I export it but cannot seem to get a column to move via Cut or copy. Anyone have any snippets of code that will do the trick? Your help is much appreciated.

td

Assuming that you want to use WinBatch to perform the task, the general solution is to perform your task while recording a macro in Excel and then translating the macro to a WIL script.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

stanl

Moving columns can often be a bit messy. You did write that you intend to export the data. Maybe a little more detail on that, because you might consider using ADO and the ACE Provider to open the Excel data as a recordset then re-arrange the columns with SQL.