viewpoint-particle

Author Topic: Moving Columns in Excel  (Read 224 times)

dcrane37

  • Newbie
  • *
  • Posts: 3
Moving Columns in Excel
« on: January 29, 2019, 08:10:17 am »
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

  • Tech Support
  • *****
  • Posts: 3014
    • WinBatch
Re: Moving Columns in Excel
« Reply #1 on: January 29, 2019, 09:18:52 am »
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

  • Pundit
  • *****
  • Posts: 934
Re: Moving Columns in Excel
« Reply #2 on: January 29, 2019, 11:18:48 am »
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.