C# Script to copy an Excel File working locally but not on the server when I schedule a job

So I have these couple C# commands to copy an Excel File which works fine and dandy on my local client when I test and run this SSIS Package but when I tried scheduling the job on the server, it failed.
These are the couple C# commands...
// This Opens the Source .xlsx File from Emdeon ePaySmart
Workbook workbook = excelApplication.Workbooks.Open(StringSourceFile, XlUpdateLinks.xlUpdateLinksNever, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
// This will Save the Source .xlsx Emdeon ePaySmart File as a .xls File...note xlFileFormat.xlExcel5
workbook.SaveAs(StringDestinationFile, XlFileFormat.xlExcel8, Type.Missing, Type.Missing, Type.Missing, Type.Missing, XlSaveAsAccessMode.xlExclusive, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Is this because I'm using xlFileFormat.xlExcel8 and locally it is running fine but when I schedule via SQL Server Management Studio as a SQL Server Agent Job it seems to be failing??
I sure hope I don't have to change this so it will run as a SQL Server Agent Job and/or run this locally every blessed week.
Can someone clear this up for me and provide a potential solution?
Thanks for your review and am hopeful for a reply.
ITBobbyP85

That is Excel automation, which requires Excel to be installed on the computer where the code runs, and is not supported on a server without an interactive user logged in.
David
David http://blogs.msdn.com/b/dbrowne/

Similar Messages

  • Flash Remoting Works Locally But Not On The Server

    Hello,
    I have a flash file that connects to an asp.net page. The
    aspx page queries a databse and returns a set of records to flash.
    Flash reads in those records and processes those records. Locally,
    this works fine. However, on the server, nothing happends. I spoke
    with tech support at hosting company and they tell me everything is
    installed for Flash Remoting.
    Here is the code thats on the server:
    import mx.remoting.NetServices;
    import mx.remoting.NetDebug;
    mx.remoting.debug.NetDebug.initialize();
    //CONSTRUCTOR
    var inited:Boolean = false;
    if(!inited){
    inited = true;
    NetServices.setDefaultGatewayUrl("
    http://63.134.251.243/gateway.aspx");
    var gatewayConn
    bject = NetServices.createGatewayConnection();
    gatewayConn.setDebugID( "Gateway Connection" );
    var SQLQueryToolService
    bject = gatewayConn.getService("matthewlemke", this
    function SQLQueryToolAction(){
    SQLQueryToolService.test("SELECT * FROM flashImages");
    function test_Result(result){
    trace(result);
    _root.abc.text = result.toString();
    SQLQueryToolAction();
    Here is the code locally:
    import mx.remoting.NetServices;
    import mx.remoting.NetDebug;
    mx.remoting.debug.NetDebug.initialize();
    //CONSTRUCTOR
    var inited:Boolean = false;
    if(!inited){
    inited = true;
    NetServices.setDefaultGatewayUrl("
    http://localhost/matt/gateway.aspx");
    var gatewayConn
    bject = NetServices.createGatewayConnection();
    gatewayConn.setDebugID( "Gateway Connection" );
    var SQLQueryToolService
    bject = gatewayConn.getService("matt", this );
    function SQLQueryToolAction(){
    SQLQueryToolService.test("SELECT * FROM flashImages");
    function test_Result(result){
    trace(result);
    _root.abc.text = result.toString();
    SQLQueryToolAction();
    Any help is greatly appreciated.
    Thanks,
    Vic

    I am having the exact same problem. My remoting application
    works fine on my laptop as long
    as the url for the gateway reads
    http://localhost/remotingData/gateway.aspx,
    but if I change
    it to the name of my machine and attempt to run the swf I
    keep getting a NetConnection.call.badversion error in the
    netconnection debugger. If I attempt to connect through IE it just
    sits with no reply.
    Is there some kind of permission thing going on here?
    Flash MX2004 Professional
    Flash Remoting Components MX2004 (unlicensed)
    IIS 6.0
    IE 6.0

  • Flash site works locally but not online (uploaded to server)

    We have bought a flash portfolio template and have customized it with our pictures, video, etc.
    When we test it locally on our computer (using different web browsers) it all works perfectly well. We have uploaded the finished website to our server and when you go to the address online, it doesn't work (a loader progress shows but it is stopped and nothing happens).
    We have however uploaded the original template we bought and it works perfectly online.
    The template consists of and index.html, various .swf, and various .xml that we have modified according to the template instructions (it also contains a java script folder we haven't touched).
    What is it wrong with our modified template - it works locally without problem…!
    Thanks for your help

    When a Flash file works locally but not on-line, it's almost always a pathing issue (provided you did upload ALL files and do not have something missing... as suggested by Ned).
    A "pathing issue" results when the main .swf cannot find one or more of the associated Flash files...like an xml file or images.
    It can be something as simple as using switching file names to all lower case. Local machine is not case sensative... most servers are. So "My Photo.JPG" is not the same as "my_photo.jpg". When naming files, best to use all lower case, no spaces in any file or folder names... use_underscore_instead.
    But the most common cause is that those associated files (xml, images, etc.) are not pathed relative to the Web page where the main .swf is embedded. Pathing to the .xml and image files should be as though the .swf was located in the same folder as the Web page... NOT the actual location of the .swf file.
    And that includes paths to the xml file and paths to image files coded into those xml files. Everything need to be coded relative to the Web page.
    This topic has been covered a number of times here:
    http://forums.adobe.com/message/4368273#4368273
    http://forums.adobe.com/message/4294529#4294529
    http://forums.adobe.com/message/4280086#4280086
    http://forums.adobe.com/message/4267408#4267408
    Best wishes,
    Adninjastrator

  • cffeed caching works locally but not on server

    So I got my new Hostek account set up (woohoo!) and I've started uploading some basic files so I can do thinks like validate my code and make sure everything's working.  One thing that does not work (but does locally) is my news feed caching.
    Pulling in two RSS feeds was seriously slowing down my index page loading, so I stole a trick from Ray Camden on caching the feeds.  It works perfectly on my dev machine at home, but doesn't work on my hosted account.
    Here's the exact code being used:
    <cfset feedurl = "http://velonews.competitor.com/feed">
    <cfset cacheTime = #createtimespan(1,0,0,0)#>
    <cfif not structKeyExists(application,"rsscache") or dateDiff("n", application.rsscache.created, now()) gt cacheTime>
        <cffeed source="#feedurl#" query="entries">
        <cfset application.rsscache = structNew()>
        <cfset application.rsscache.data = entries>
        <cfset application.rsscache.created = now()>
    </cfif>
    <ul>
    <cfloop query="#application.rsscache.data#" startrow="1" endrow="6">
    <cfoutput><li><a href="#rsslink#">#title#</a></li></cfoutput>
    </cfloop>
    </ul>
    I tried wrapping a try/catch around the top section (above the <ul>) and still got nothing for an error message.  The page just stops being rendered at that first <ul>.
    I'm not sure why it works locally but not on the web server.  Any ideas?

    Miraculously, I got it working.
    I changed this:
    <cfloop query="#application.rsscache.data#" startrow="1" endrow="6">
    <cfoutput><li><a href="#rsslink#">#title#</a></li></cfoutput>
    </cfloop>
    To this:
    <cfoutput maxrows="6" query="application.rsscache.data">
    <li><a href="#rsslink#">#title#</a></li>
    </cfoutput>
    And bingo!  It worked. Perhaps it's an idiosyncrasy between CF9 and CF10.

  • [AS3] EventDispatcher works locally but not remotely

    Hi,
    I am very new to Action Script and have the following
    problem. I hope someone can point me in the right direction.
    I have a small video player app. I have added the FLVPlayback
    component to the stage and set some properties via action script
    (AS 3)
    I then instantiate a class to go and retrieve some XML,
    register an eventListener to wait for the XML to be loaded and once
    the event has fired, load the FLV file (just hard coded at the
    moment) into the FLVPlayback object.
    This works when testing in the Flash IDE but not when I
    publish the movie to my webserver. I have tried commenting out the
    player.load() and just adding a textfield and again this works
    locally but not when I publish to the webserver. I have included
    some code snippets below.
    Can anyone tell me where I am going wrong?
    Any pointers much appreciated.
    Thanks
    Martin

    Hi,
    I found the problem if anyone has the same issue. I was
    passing some FlashVars in incorrectly using the
    AC_RunActiveContent.js that comes with Flash. I have switched to
    swfobject and all is well.
    thanks

  • I can connect my Iphone 6 and Ipad Air to my Bose Soundlink but not my IMac.  I have tried all the usual solutions but nothing works.  It has worked recently but not in the last week. Help

    I can connect my Iphone 6 and Ipad Air to my Bose Soundlink but not my IMac.  I have tried all the usual solutions but nothing works.  It has worked recently but not in the last week. Help

    make sure it's not being connected to by any of the other two
    one can only connect 1 device at the time and just by waking up sometimes a headset connects to a device
    automaticly
    then forget the bluetooth device in OS X and put the headset in pairing mode / discovery mode and connect with it once again with the mac

  • I BOUGHT an application from my iphone Application icon and paid 2.99 dollars too, for phone tracker , downloaded sucessfully and its working too but not tracking the phones as mentioned in the description can any one support me??? better from apple

    I BOUGHT an application from my iphone Application icon and paid 2.99 dollars too, for phone tracker , downloaded sucessfully and its working too but not tracking the phones as mentioned in the description can any one support me??? better from apple!!

    Is this the app you're referring to?
    http://itunes.apple.com/us/app/phone-tracker/id348537489?mt=8
    As you'll note it's made by Presselite and that page has a link to their support.
    Also, you'll find it best not to post questions about iPhone apps in the AppleWorks forum. Best to contact the makers of the app.
    Regards
    TD

  • My Javascript works in Dreamweaver Live View, But Not On The Server

    I set up a javascript function to set the focus to the first field in a form as the page loads.  It works fine in Dreamweaver's Live View, but not on the local or remote servers.  Here's the code:
    In the heading I have the following function:
    <script type="text/javascript">
    function setFocus()
    document.getElementById("firstname").focus();
    </script>
    In the <head tag, I have:
    <body onload="setFocus()" ...
    and the first field in the form is:
                <input name="firstname" type="text" id="firstname" style="text-align: center; color: #009; text-transform: capitalize; font-variant: normal; font-weight: bold; line-height: normal; font-style: normal; font-size: 14px; font-family: Arial, Helvetica, sans-serif;" tabindex="1" value="<?php echo $fstname; ?>" size="15" maxlength="20">
    I guess I must be missing something, but don't know what.

    EUREKA! (and OOOPPPPSS!)  I found the problem (and I thought javascript was case sensitive - according to the tutorial, it's supposed to be).
    Here's apparently wha hoppen.  The first field in the form is the person's first name, but it's also a SPRY validation field.  I gave the actual field the name and id of "firstname", and the SPRY validation the name "FirstName", figuring that scripts would be case sensitive.  In fact, when I first inserted the SPRY object, I tried to name it "firstname" also, but it wouldn't let me, so I capitalized the first letters, and it accepted that; that made me feel that this is OK.  Here's the entire field's code:          <label>First Name:
               <span id="FirstName">               
                <input name="fstname" type="text" id="fstname" style="text-align: center; color: #009; text-transform: capitalize; font-variant: normal; font-weight: bold; line-height: normal; font-style: normal; font-size: 14px; font-family: Arial, Helvetica, sans-serif;" tabindex="1" value="<?php echo $fstname; ?>" size="15" maxlength="20">
                <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldMinCharsMsg">Minimum number of characters not met.</span></span></label>
    I accidentally tripped over the answer when I started using the Dreamweaver's Edit>Find Next search to see if I had something else named "firstname", and I found that it located every permutation of that word (e.g. firstname, FirstName, FIRSTNAME etc.).  Having seen that, I tried changing the "name=" and "id=" to "fstname, and the same corresponding change in the javascript, and VOILA! it worked.  That leaves me rather curious about this alleged "case sensitivity" thing.  I get the impression that it IS case sensitive, except when IT'S NOT.  How does this work, and how do I know when it is and isn't?

  • Swf works locally, but not on server

    I have an issue with an xml-driven swf file. It plays fine when I test the site locally, but not when it's uploaded to a server. Here is a link to the page. There are many posts on this and other forums describing the same problem, though I can't find the right solution. The only thing it has convinced me of, is that it is probably a pathing problem. I purchased the file online, and instead of one swf and one xml there are about ten of each to make it work. In addition to this there are about 40 .as files. (all this to make it "easier" to customize).  Since I plan to use this banner rotator on multiple pages, it will be very unconvenient to upload all these files for every page I make. I checked with support for this product, and was told I could make a flash directory, only duplicating the xml-files for each new page and linking the xml back to the swf-files. Otherwise the support answer was very short and unhelpful. I have renamed every path in the xmls so that it should be right. As I said, the file works locally, so I'm not sure what I am doing wrong.
    I have posted in adobe forums before, and I have alwas found helpful and kind responses.
    Thank you,
    Siri

    They're all uploaded to the server, it is also possible for me to dowload them from there. When i run the main swf file through flash player debugger, I get this message:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/xml/abrMain.xml
              at com.sQrt121.utils::CustomLoader/configureLoader()
              at com.sQrt121.utils::CustomLoader()
              at com.sQrt121.utils::LoadJob/initJob()
              at com.sQrt121.utils::LoadJob()
              at com.sQrt121.utils::ContentLoader$/addJob()
              at AbrMain/init()
    So I guess it can't locate the xml folder (since it is not there), but I don't know how to change the path. I can change it in the xml, pointing to the swf, but how do I do it the other way?
    This is the main xml-file:
    <?xml version='1.0' encoding='UTF-8'?>
    <abrMain
              width                              = "300"
              height                              = "250"
              pauseOnOver                    = "off"
    >
              <item          swf                    = "/Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/abrcontent.swf"                                    xml = "xml/abrContent.xml"                                        config          = "xml/config.xml"/>
              <item          swf                    = "/Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/abrbuttonscolor.swf"                               xml = "xml/abrButtonsColor.xml"                                        config          = "xml/config.xml"/>
              <item          swf                    = "/Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/abrpreloadercircle.sw f"               xml = "xml/abrPreloaderCircle.xml"                              config          = "xml/config.xml"/>
              <item          swf                    = "/Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/abrpreloaderline.swf"                               xml = "xml/abrPreloaderLine.xml"                              config          = "xml/config.xml"/>
              <item          swf                    = "/Users/Siri/Documents/gullstolen/hjemmeside/flash/produkter/deploy/abrplaypause.swf"                               xml = "xml/abrPlayPause.xml"                                        config          = "xml/config.xml"/>
    </abrMain>
    the abrMain.xml tells the swf what files it shold use, and where to find them, but where do I tell the abrMain.swf to find the xml? Maybe this is an issue for product support instead, though they only answer short and cryptic.
    Murray *ACP* wrote:
    None of your SWF files are found in the location where the page's code places them.
    For example:
    <param name="movie" value="../../../flash/produkter/deploy/abrmain.swf" />
    Did you upload them?

  • Facetime works local but not long distance

    i have been using facetime for 2 years.  Last week (soon after upgrade 8.2)  my service became intermitant.  it works locally,  but long distances it is ringing but no one is answering...
    I am using airport extreme....so not sure if its extreme or something else causing this...

    chris,  thanks so much but i think it has to do with port somehow.
    since i am out of the us it works fine in where i am at,  but trying to get to the us in just rings off the hook and no one can pickup....so it gets a notification that the call is coming through but ends at that point.....and i am just pushing voice only not video.
    other people where i am at use facetime and are able to talk to people in the US...I have been doing so until 1 week ago,  when i downloaded 8.2   Thanks for your reply looking forward to understanding what else i can do......
    ps already installed firmware in extreme...but didn't solve the issue.

  • Flash file works sometimes, but not others

    Here is the page with what I am trying to do. It is volunteer
    work for a non-profit, and I am not an uber flash programmer, but I
    have come this far, and would appreciate any helps diagnosing the
    possible causes for this. Please view this link to see what I am
    talking about. Clicking on the thumbnails opens a separate window
    with a photo gallery.
    http://www.coafkids.org/dev/photovideo/
    On my computer, this works fine, both on the authoring end
    and the server end. On some others, reportedly, they can view some
    of the gallery slideshows, but not others. The reports have been
    random, so there is no consistency with which shows work and which
    do not.
    The flash file is the same exact file for each of the
    galleries. Each gallery has its own folder on the server. In this
    folder, there is a flash file(same exact file in all galleries) an
    XML file specific to that gallery, and an images folder. The XML
    file gives the flash file the location and respective caption for
    each image that is located in the images folder. With all the flash
    files named exactly the same in each folder, with exactly the same
    code, how does it not work on only some machines??
    Any light, anything at this point would be extremely
    helpful..
    Thank you in advance,
    Armo

    The people that report problems are only reporting them for
    one, two, or sometimes just three out of the 9 galleries.
    Therefore, since it is exactly the same flash file used in all 9,
    why would some choose not to work. And even worse, why are the ones
    that do not work varied across each person?
    Thank you for your response.... hope we can all solve this
    mystery together...

  • IWeb snippets working  locally but not working when uploaded to ISP

    I am using iWeb 3.0.2. When I add an HTML snippet to a page to add an item to a shopping cart [ADD TO CART], then publish and view site, the snippet works perfectly.
    However when I upload the page to the ISP, the snippet is not displayed even though I can see all the necessary 'widget1_markup.html' present in the page source, and when I browse for that widget URL it is present.
    Is something missing from the ISP to process this type of facility, or is it something else.
    Your suggestions gratefully received.

    Welcome to the Apple Discussions. 3What's the URL of your site so we can examine it first hand? While this is just a guess without looking at your site I'd say that not all of the files in your site's Scripts folder are getting uploaded to the server.
    How are you uploading the files? With iWeb's FTP client or a 3rd party client? If it's iWeb's client, publish your site to a folder on your hard drive and use the free Cyberduck client to upload the files.
    OT

  • Javascript working locally but not on sever

    Hello,
    Since this is a javascript question I'm ont sure this is the right forum, but since I've always had great help here I thought I'd give it ago, and for all i know , it is DW related...?
    So i have a website that's been online for years, which using a javascript scroller that i found online, a long while ago.
    Yesterday i made some site edits, that didn't (so far as I'm aware) involve messing with any of the javascript or links to external CSS or script files, but suddenly the scroller isn't working any more.
    Oddly though, it works locally in Live Design view, and in all browsers previewed locally too (usinag MAMP server)... but just not online.
    Why did it suddenly stop working?
    Here is al link to a stripped down version of teh problem, and i'd be grateful of any help anyone can offer:
    http://tinyurl.com/scrollernotworking
    Thanks so much in advance,
    Katrina

    Turns out the one-line code was definitely the issue. Now as to why it was being compressed in that way is beyond me.
    Here is a link to a follow up discussion regarding why my code was being minifed (still unsure at time of writing):
    http://forums.adobe.com/message/5401932#5401932

  • Hyperlink works locally but not on Intranet

    Hi,
    Very strange behavior since most of other hyperlinks in
    separate projects only work on the Intranet, but not locally. All
    setting for hyerlinks are the same since they were pulled from a
    template.
    Any ideas
    lisa

    Lisa,
    Your inability to get your Captivate files working properly
    from a local machine may be related to the Flash Player security
    restrictions issue:
    Link
    to Adobe Knowledge Base Article
    The article is a bit misleading as it implies that you only
    need to change your settings if your Captivate file is actively
    passing information to the Internet somehow, but I've found that I
    pretty much always run into the security issue when previewing
    files locally in the browser.
    Since I tend to help out on lots of other people's projects
    at work, it turns out it's easier for us as a group to simply
    publish directly to an Intranet server and preview from there via
    HTTP (i.e. navigating to the correct web server URL in a browser).
    This allows us to not only avoid the security issues, but ensures
    that we've copied all the necessary files to the server.
    For my own projects, I've also specified a common "published"
    folder on my local machine as "safe" in the Flash Player Settings
    Manager so I can quickly test my projects using the "View Output"
    button in Captivate's Publish dialog.
    This last tidbit is something that people often overlook.
    Unless you specify your publish location as "safe" in the Flash
    Player Settings Manager,
    any file you launch via the View Output button is considered
    "local" and subject to the tighter security restrictions associated
    with locally-accessed files.

  • Works locally but not remotely

    Hi,
    I'm loading jpegs randomly into my .fla. It works fine
    locally, and it worked fine when I tested it on my personal
    website. But on my company's site, the jpegs don't load. I'm
    thinking maybe it's a path issue, but not sure what the fix
    is...any help would be welcome.
    This is the code I'm using:
    randomNum = Math.round(Math.random()*15);
    loadMovie(randomNum+".jpg", this.blank");
    I've tried adding a path like
    /graphics/flash/2007jazzfest/this.blank but it doesn't like the /.
    I've tried quotes around everything, but it doesn't work...
    You can see it work at:
    http://www.willyurman.com/Test/jazzfest2007.html
    1. click skip intro to get past the opening
    2. click either small red 'jazz fest' button in the upper
    right or left. It should take you to the credit page where a
    different jazz quote appears at random at the bottom.
    On my work site, everything works except that the quotes just
    don't load.
    I go live with this Friday night(the 8th) so any help would
    be appreciated :)
    thanks
    will

    comment out that code. hardcode one jpeg to load and test.
    does that work?
    if yes, copy and paste the code that works and copy and paste
    the code that fails.
    if not, your path may be wrong or your jpegs may be
    corrupted. to check which, enter the path/file name of one of the
    jpegs in your browser window. if it loads, the path in your swf is
    wrong. if it doesn't load you may have the wrong path in your
    browser and in flash, or your jpg is corrupt.

Maybe you are looking for

  • Warning Message in MB52

    Hello Friends, When we enter in MB52 screen and execute report we get warning message. In standard system from where this message is coming. this message is not configured in OMCQ. Still this message comes. How we can remove this message. Regards Kan

  • Very strange error : IDOC to jdbc scenario

    Hi I am getting a very strange error when I see the log for the idoc to jdbc scenario that I am building. The mapping test shows the header record and line item record properly in the mapping result. insert, access nodes, fields with access nodes are

  • Doubt regarding CURSORS in PRO*C

    Hi all, I have a problem with cursors in proc 1. Can i declare a cursor and with in it another cursor in proc like EXEC SQL DECLARE emp_cursor CURSOR FOR SELECT ........; EXEC SQL OPEN emp_cursor; for(;;) EXEC SQL FETCH emp_cursor INTO :emp_structure

  • Equipment Tasklist and Component structure

    There is an equipment BOM. While creating a tasklist on this equipment the 'Component Selection' push button in the Component overview screen is not responding. it is expected to take to the BOM list. (This is for selecting materials for an operation

  • Finder. Console Message "No icon found :("

    Hi all! I have iMac11,2, Mac OS X 10.6.7 Sorry, English is not my native language, so to better understand situation, describe steps that I do. I mount any DMG image, automatically opens a Finder window and displays contents of that image. I unmount