Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.sdk,microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default launching Excel with a macro to operate on CSV data?

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
  #2   Report Post  
Posted to microsoft.public.excel.sdk,microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to bypass Open macro when launching Excel 2003 Andre Lavoie Excel Programming 1 April 5th 06 08:08 PM
Launching Excel macro for every workbook opened. AbsoluteZero Excel Programming 1 December 15th 05 06:21 PM
macro to operate in protected cells HGood Excel Programming 2 December 1st 04 09:11 PM
Launching Excel programmatically not the same as launching excel manually Atchoum Excel Programming 2 November 24th 04 06:24 PM
launching excel, a file, and a macro automatically Bernie Yaeger Excel Programming 0 September 16th 04 05:45 PM


All times are GMT +1. The time now is 10:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"