+ Reply to Thread
Results 1 to 3 of 3

EXCEL in Background Mode

  1. #1
    Registered User
    Join Date
    12-25-2006
    Posts
    1

    EXCEL in Background Mode

    I'm an iSeries developer and know just enough Excel to get into trouble. I have an iSeries application which generates a CSV file of data. This data is generated via a batch process on the iSeries, and we have a mechanism to start excel on a PC type of machine using an XML interface file and a vbScript program which can start Excel with the appropriate template. We want to generate an XLS file from the merging of the CSV file and the associated Excel template. The XLS file will then be e-mailed to the recipient as an attachment so the recipient.

    The batch process on the iSeries will run through a scheduler at some time in the early hours of the morning.

    The interesting thing is that there is no need for a human, which means there is no need for any on-line interaction.

    So the question is, how do we open a template with an associated CSV data file and create the XLS without the work-sheet displaying?

    A batch process on an iSeries machine is simply one which does not require any user interaction.

    Excel always seems to open in interactive mode.

    I've seen a switch which allows a particular template to be used, and another which suppresses the Excel notification window, and I think the answer may be in VBA in the Open event.

    I hope I've made sense.

    Thanks In Advance.

  2. #2
    Forum Contributor
    Join Date
    07-05-2006
    Location
    Canada
    MS-Off Ver
    2003, 2007
    Posts
    581
    I'm not sure I see the problem with it being interactive for what you're doing.

    Can you not get your batch file to start Excel, have the Workbook_Open macro
    call whatever procedure you've written to automate the merging of the .csv and template, and then do everything you need to do as well as have it close Excel afterwards?

    Or are you referring to the interactive bit for importing the .csv? For me, .csv files open automatically without any interogatives. I have to change the extension to .txt or something to force it to interactive at times. I do get the interactive stuff for other extensions for data files to import.

    If you're referring to saving files without the prompts, deleting stuff without the prompts, etc, you can set:
    Application.DisplayAlerts = False

    To increase the speed, you can also put:
    Application.ScreenUpdating = False

    Other than that, you'll probably need to clarify your needs.

    Scott

  3. #3
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303
    Can you put some attachements with the templates and the CSV so that we can come to know what exactly you want?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1