How can i execute excelsheet without giving path in java

Hi,
How can i execute excelsheet without giving path in java, through this code, you can open the notepad but
I want whereever the excel is installed in your machine , fine and open excelsheet without given absolute path.
class ExecuteCommand{
public static void main(String d[]){
     Runtime r = Runtime.getRuntime();
     Process p= null;
     try{
     p = r.exec("notepad");
          catch(Exception e){
               System.out.println("error");
If you know please send me your idea and code samples.
regards
Mohan kumar

just execute the exelfile with the Windows "start" command:
Runtime.exec("cmd /c start "+excelFileName);But this requires that Excel is the default application for the Excel file type (*.xls). You can test this by simply typing "start myTestExcel.xls" in a dos box.

Similar Messages

  • I sold a ipad 1.. I did a reset and cleaned out all data.. however, the new owner tells me when he connects to itunes it is asking for my password.  how can i resolve this without giving him my password

    I sold a ipad 1.. I did a reset and cleaned out all data before shipping to him.   however, the new owner tells me when he connects to itunes it is asking for my password.  how can i resolve this without giving him my password?  will a hard reset take care of this?

    Have the purchaser go to Settings/Store, tap your Apple ID and then choose Sign out.
    The purchaser will then need to tap Sign in and enter their own Apple ID for their iTunes account.

  • How can I execute a batch file from my java program

    Hi,
    Can someone help me or direct me to a link,
    How can I execute a DOS batch file from my java program?
    Thanks

    You will need to grab a handle to the process's
    outputstream so u can see its output.The OP didn't mention any output from any batch file;
    nor any input for that
    matter,so lets not complicate matters here for now
    ok?Actually I think this is essential to see whether it works or not. It's either that or do some manual check to see whether it ran, which is not exactly elegant, and in some cases this may not be easier than simply writing the output stream code, or in fact it may be impossible to check manually.
    I'm sure it wasn't intentional that your post appeared to be bristling with attitude.

  • HELP ME! PLEASE! how can i sign in without giving them a credit card?

    i have no idea how to sign in without giving them my credit card number..? i just plan on buying iTunes cards. i know someone out there has got to know the answer to this..! please help me!! step by step instructions please!! thanks,
    -lost & confused

    Buy an iTunes card first.
    At the iTunes stre, click on Redeem.
    It will ask for the card number, then askif you want to create a new account or use an existing account.
    When you create a new acccount this way, you do not need a credit card. When it gets to the section for CC details, select None.

  • How can i execute a .jar or .jad through  java?

    I want to execute a .jar like i do in SE using the class RunTime in ME does anybody know how can i do it? There is no method exec in MIDP Runtime API

    I have a MIDlet that receives a jar file from another PDA using DatragramConection and FileConnection. It's working well. When i'm running my application i'll send the jar file to another aplication and this application should receive, execute and return the result. For example, if i have a simple program that prints Hello World. I'll send the program the other PDA will execute and then return a String. I have to call the jr file through java because my MIDlet wil be already running.
    Could you understand my problem?

  • How can you contact itunes without giving a serial number?

    Does anyone know how to contact Itunes without having to give a serial number?   I just need then to allow me to update things, but the system does not recognise my password

    Hi Stupid021,
    If you are having an issue with signing in to update your software in iTunes, you may want to reset your Apple ID password. Use the steps in this article -
    Apple ID: Changing your password - Apple Support
    If you do not have the password available you can reset it using this article -
    If you forgot your Apple ID password - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • How can I execute command passwd in solaris with Java (ProcessBuilder)

    Hi all, my problem is that I want to change the user password in solaris 10, but from a Java programm, I was trying with ProcessBuilder but I don't know how insert the new password, Who can help me?

    I'm not sure, but I think passwd is one of those programs that only lets itself be run interactively from a terminal.

  • How can I execute a Procedure with OUT variable is %ROWTYPE on SQL Prompt

    Hi,
    I have a procedure with OUT variable is %ROWTYPE
    How can I execute the following procedure on SQL prompt.
    (without creating anonymous block)
    CREATE OR REPLACE PROCEDURE zz_sp_EMP(VEMPNO IN EMP.EMPNO%TYPE,
    V_REC IN OUT EMP%ROWTYPE)
    AS
    BEGIN
    SELECT * INTO V_REC FROM EMP WHERE EMPNO = VEMPNO;
    END;
    Thanks & Regards,
    Naresh

    as previous posters said: it's not possible to do this without declaring a variable in the anonymous block.
    With anonymous block it would look like this (had to change it a bit, since i'm using hr-schema on oracle XE):
    declare
    l_rec EMPLOYEES%ROWTYPE;
    begin
    zz_sp_EMP(VEMPNO => 100, V_REC => l_rec);
    DBMS_OUTPUT.PUT_LINE ( 'first_name = ' || l_rec.first_name );
    DBMS_OUTPUT.PUT_LINE ( 'last_name = ' || l_rec.last_name );
    end;
    first_name = Steven
    last_name = King

  • How can I execute external application?

    Hi friends I want printing my barcodes a laser printer (Kyocera) it isn't a barcode printer. So I think (and I look kyocera web page my model doesn't support barcode printing in sap) print my barcodes using an external system. Before SAP we are using JollyPrint application for printing barcodes. It is using an Excel file.
    I can create a excel file for this application. I must execute this (JollyPrint-it is a label application) application when I press a button. How can I execute this application?
    Thanks
    Mehmet
    P.S. I have been writing this message with details may be somebody can give me a simple way for this

    Well, I can suggest you following steps. May be it works for you .
    -Create an external OS command in SM69
    -Test OS command in SM49 ( <u><i>about OS command if you search in SDN you’ll get lot of material</i></u> )
    -Create a Script at your OS level, I’m assuming you might have some UNIX flavor or Sun solaria’s.
    -Create a Shell script , which execute the printer job from OS .
    -Shell script will have parameters . ( e.g. printer name, destination etc )
    -set the path of shell script directory in SM69 ( the command you just created )
    -Execute shell script using your ABAP program ( use FM "SXPG_COMMAND_EXECUTE" )
    In the ABAP  program you can pass the parameters and execute the command from ABAP as a result your job will start printing on the required destination. Moreover, you can also capture the spool at OS level .
    FYI
    For UNIX script, if you search in www.google.com ( UNIX forums) . you’ll get shell script .
    Hope this’ll give you idea!!
    <b>P.S award the points.</b>
    Good luck
    Thanks
    Saquib Khan
    "Some are wise and some are otherwise"

  • How can i execute a workflow using a bapi/wapi??

    Hi All,
    How can i execute a workflow using a bapi/wapi??
    pls advice
    thanks

    Hi Hrus,
    it's not as simple as a single BAPI to approve a workflow.
    Workflow comes with a Workflow API (WAPI) that you can use to programmatically interact with the workflow system. The WAPI is implemented as a group of RFC-enabled function modules that are prefixed with "SAP_WAPI_".
    Approving a workflow is simply taking a decision path for a workflow item. It is logically no different to rejecting the same workflow item or any other workflow decision.
    As part of NetWeaver workflow is tightly coupled to the WAS platform you are running on so you may need to perform WAPI operations slightly differently on older releases.
    Some of the WAPI calls you might need to use include: -
      SAP_WAPI_GET_HEADER to get the workitem header
      SAP_WAPI_READ_CONTAINER to get the workitem container
      SAP_WAPI_GET_OBJECTS to get the attached objects
      SAP_WAPI_DECISION_READ to get a list of possible decisions
      SAP_WAPI_SET_WORKITEM_STATUS to set the workitem status
      SAP_WAPI_WRITE_CONTAINER to write to the workitem container
      SAP_WAPI_EXECUTE_WORKITEM to execute the workitem
    I usually do what you are trying to do by adding the decision to the workflow container and then executing the workflow.
    Be warned, you can really stuff things up if you get this wrong! Make sure you know what you are doing.
    Quoting from Practical Workflow for SAP by Alan Rickayzen, et al from SAP Press...
    Writing directly to the workflow container is dangerous because it can compromise the integrity of the process.
    ...be careful that you do not waste time duplicating existing ad hoc features of SAP's Workflow Engine.
    For example you can use events (combined with wait steps), instead of container modifications to force the workflow to restart.
    Cheers
    Graham Robbo

  • Photoshop cs6 crashes with "appcrash - module ig75icd64.dll; no problem for a local admin user however. i've tried giving specified user full access to photoshop.exe and set it to Win XP compatibility. how do i fix this without giving user local admin acc

    photoshop cs6 crashes with "appcrash - module ig75icd64.dll; no problem for a local admin user however. i've tried giving specified user full access to photoshop.exe and set it to Win XP compatibility. how do i fix this without giving user local admin access?

    Danny,
    Topic or subject titles should be clear, pertinent and concise so that individual users can tell at a glance if they can help or not.
    That field is not for attempting to fit your entire question in there.
    Please keep this in mind next time you post.  Thank you.

  • Teststand 1.03 - How can I get the sequence file path into an expression?

    The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
    Thanks

    As Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.
    If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
    Attachments:
    GetSeqFilePath.seq ‏22 KB

  • My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can i fix this without turning off iCloud?

    My Outlook/iCloud calendar invites to others appear to work on my end and sync with my PC and mobile, but when other people "accept" the invite, it will not populate/add in to their calendar. How can I fix this without turning off iCloud?
    I am at a new office that uses Outlook (not Outlook Exchange) which does not sync with my mobile... I just got iCloud set up on my PC to sync my contacts, calendar, reminders, etc... The sync worked (not without flaws, but the other issues seem solvable... I think), so that i can now see all my appointments on both my phone and on my PC. The problem I am having is that iCloud moved all of my calendar items from Outlook into iCloud calendar and now when I send out meeting/calendar invites the recipients may accept them, but the meeting does not get added to their calendar. This is a huge problem and may mean that i need to turn off iCloud.
    Does anyone know how to fix this?
    Thanks!

    I am replying to my own post here as I seem to have fixed the problem.
    I do have some calendars that are shared. Some of those are shared with users who have time zone support turned on. So i activated time zone support on my iphone, then deleted my icloud subscription. I then signed in to icloud again and voila... problem solved.
    It is a weird one as the other calendar views were always fine and when you opened an event that appeared in the wrong day (on list view), the correct date of the event was shown in the information...
    one more bug in a complicated system I guess

  • How can i transfer videos without losing the sound to my iPhone 3G?

    Hi
    I have bought my iPhone 3G yesterday. I have found out how to transfer music from iTunes however i can't transfer videos. I'm selecting the videos i want to transfer on the videos tab after i chose my iphone from the side menu and pressing apply. iTunes says that its syncing my iphone but it doesnt transfer the videos.
    Lately i have found out a function on the advanced menu for movies as "create iphone or ipod version". When i used that it transfered that video to my iPhone however the sound was completely lost besides that action takes too much time(around 10 mins for a 3 min video and i have a pretty strong computer).
    How can i transfer videos without losing the sound to my iPhone 3G?

    One thing I'd recommend is that you make sure the video/audio you're trying to transfer falls within the guidelines listed in the 'Video' section here:
    http://www.apple.com/iphone/specs.html
    What's most likely happening is that the file is not converted as such so when you try to transfer it, it's wanting to convert it but is unable to for any number of reasons.
    There's software out there that might make this easier for you but I can't recommend anything specifically.

  • HT2534 I  don't have a credit card and would like to update facilities on my iPAD. How can I do this without a credit card?

    I don't have a credit card and would like to make updates on my iPAD. How can one manage this without a credit card?

    You use a debit card just like you use a credit card in iTunes. You have to enter the card number, security code and billing address as you would with a credit card when you set up the ID. You can make changes to your payment method in your account at any time.
    If you want to create an Apple ID without using a credit card you must first sign out of the Apple ID that you already created in Settings>Store>Your Apple ID.
    But ...you will also need another email address now if you already created an Apple ID, because that first email address is now associated with that first ID that you created.
    If you do have a debit card, you may just be better off entering that card information into your account and use that now. You don't need to even use the debit card if you can purchase iTunes gift cards and redeem those. I use iTunes gift cards exclusively now instead of using my credit card.

Maybe you are looking for