Results 1 to 7 of 7

Thread: connect to client excel application

  1. #1

    Thread Starter
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    connect to client excel application

    I want to open Microsoft Excel on a client machine.
    Then add some data to a workbook and save the workbook on the users computer on a predefined place (without the user having to save the document).

    I've only been able to write documents to a local path on the webserver, but not on a client. My Boss keeps saying it is possible, but i can't find out how.

    Can anybody help me?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: connect to client excel application

    You can do it one of two ways:

    Create the Excel file on the server, then write to the user's machine in a response stream (so that they are prompted to save it).

    Or,

    Create an ActiveX control which the users must install on their machines which will write the Excel files to their hard drives.

  3. #3

    Thread Starter
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    Re: connect to client excel application

    Quote Originally Posted by mendhak
    Create an ActiveX control which the users must install on their machines which will write the Excel files to their hard drives.
    I've created my ActiveX control. Is it possible to give me an example how to link the activeX control to the asp.net-page / asp.net-project? Will Internet Explorer ask the user to install this activeX component or should i add special code to do this?

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: connect to client excel application

    IE will prompt the use to install this control. Other browsers will ignore the ActiveX control.

    To place an ActiveX control on your web page, first of all, find out its CLSID. You either have this already, or you can run through the registry and find it.

    Then,

    HTML Code:
    <OBJECT ID="MyObject1" CLASSID="CLSID:6F83F556-4DAF-11D2-B06F-0020186313EF"
               CODEBASE="MyOCXFileName.OCX">
          </OBJECT>

  5. #5

    Thread Starter
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    Re: connect to client excel application

    Is it possible to access this object from the code-behind-window?
    I want to call a public sub that is defined in my activeX.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: connect to client excel application

    No you cannot. But you could do it with javascript...

    HTML Code:
    var ax;
    ax = new ActiveXObject('object.name');
    ax.FunctionName();

  7. #7

    Thread Starter
    Fanatic Member robbedaya's Avatar
    Join Date
    Jul 2002
    Location
    Belgium
    Posts
    872

    Re: connect to client excel application

    how can i pass a string-parameter and a date-parameter to my function
    Can i do it lile this?
    HTML Code:
    ax.MaakAgendaPunt('test1', 'test2', #21/03/2006#, #22/03/2003#, 'Here');
    Do I use single quotes for strings and "railroad"-marks (#) for dates, or am i mistaking?

Posting Permissions

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



Click Here to Expand Forum to Full Width