launching Excel with a macro to operate on CSV data?
Rob Y wrote:
Is it possible to launch Excel with command-line arguments so that it
imports a CSV file and then runs a macro on that file to format the data?
If not possible from the command line, what's the easiest way to do it
programmatically. I want to do this from a WIN32 SDK C program.
Currently, I just use ShellExecute on the CSV file to open it. That
works great. But of course, doesn't do any formatting.
Thanks,
Rob
Just curious. There were responses posted to just about every other
question asked yesterday but this one. Am I completely off base in
wanting to do this? I've found some usenet postings from other people
trying to do the same exact thing - so it doesn't seem that outlandish.
If it's not possible to automate pre-processing a CSV file with a macro
from the command line, is it at least possible to do it via OLE
automation (or some other programmatic mechanism)? Can you get Excel to
import a CSV file and *then* run a macro on the resulting worksheet,
leaving the results open in Excel and detaching the calling program from
excel? If so, can somebody please point me to the appropriate API(s) to
use?
Thanks,
Rob
|