Creating an Excel Spreadsheet using Excel.Applicat

Results 1 to 9 of 9

Thread: Creating an Excel Spreadsheet using Excel.Applicat

  1. #1
    Brian Yager Guest

    Default Creating an Excel Spreadsheet using Excel.Applicat

    Hello all.. <BR><BR>I am usingthe following bit of code and getting an error with it: <BR><BR>Set fs=CreateObject("Excel.Application") <BR><BR>What do I need to do to this to allow it to work? I have the correct permissions. <BR><BR><BR>Here is the error<BR><BR>Microsoft VBScript runtime error &#039;800a0046&#039; <BR><BR>Permission denied: &#039;createobject&#039; <BR><BR>Thanks, <BR><BR>Brian

  2. #2
    Bill H. Guest

    Default I assume...

    that you have the Excel object library referenced in your project?

  3. #3
    Brian Yager Guest

    Default RE: I assume...

    I would like to think that I do....but I have no idea what that is...Did I mention that I am an idiot when it comes to ASP? Could you tell me how/what I need to do to reference this?<BR><BR>Thanks,<BR><BR>Brian

  4. #4
    Bill H. Guest

    Default Well...

    you certainly did NOT mention that! Just kidding...put this at the top of your global.asa file...<BR><BR>&#060;!--METADATA TYPE="TypeLib" NAME="Microsoft Excel 9.0 Object Library" UUID="{00020813-0000-0000-C000-000000000046}" VERSION="1.3"--&#062;

  5. #5
    Brian Yager Guest

    Default Self Proclaimed ASP Idiot!!

    I added that and nothing changed. I can use this<BR>Set fs=CreateObject("Scripting.FileSystemObject")<BR>a nd I don&#039;t get an error which tells me my permissions are correct (at least I assume that&#039;s what that means). But you are telling me that the code<BR><BR>Set fs=CreateObject("Excel.Application")<BR><BR>is correct and nothing needs to be addedto it?

  6. #6
    Bill H. Guest

    Default Actually...

    now that I think about it, I&#039;m not sure that you can manipulate the Excel object inside ASP code. You might be better off...well, you&#039;d definitely be better off using VB to create a COM component using the Excel object, then referencing that component in your project. What are you trying to do?

  7. #7
    Brian Yager Guest

    Default RE: Actually...

    I am trying to create an Excel spreadsheet, populate it with data from my DB, and somehow set off a VBA script that will add a chart/graph to the spreadsheet based off of the data I populated it with. I have been trying to figure this one out for about a week now. I can create the spreadsheet...I just don&#039;t know how to use the VBA script within my ASP code...But if you think I should do it in VB....Heck, I&#039;ll try anything right now!<BR><BR>Brian

  8. #8
    Bill H. Guest

    Default Definitely

    You have full access to the Excel Objec in VB. Just add it to your project references. Create a component that does what you want, and call that component from your ASP page. I&#039;ve done similar stuff with word. Keep in mind that this stuff is done on the server, so if/when you save the spreadsheet it&#039;ll save to the server. All stuff to keep in mind.

  9. #9
    Brian Yager Guest

    Default Thanks Bill

    Thanks for all your help Bill. I appreciate it.<BR><BR><BR>Brian

Posting Permissions

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