How i will see print Preview of an excel by clicking a button in java

hi,
I have created an excel file from java. Now i want to see the print preview of this file by clicking a button in java? Is it possible in java? I have used JExcelApi for this. Is there anybody can help me?
This is my code:
package image_handle;
    import jxl.Workbook;
    import jxl.write.*;
    import java.io.*;
    import javax.print.*;
    import javax.print.attribute.*;
import javax.print.attribute.standard.*;
    public class Excel {
      public Excel(String name) {
       try{
        Workbook wb= Workbook.getWorkbook(new File("report.xls"));
       WritableWorkbook copy=Workbook.createWorkbook(new File("Workbook.xls"),wb);
      WritableSheet sheet = copy.getSheet(0);
      Label label = new Label(0,1,"Bina");
      sheet.addCell(label);
      Label label1 = new Label(1,1,"187");
      sheet.addCell(label1);
      WritableImage image = new WritableImage(2,3,2,4,new File(name));
      sheet.addImage(image);
      copy.write();
      sheet.p
       copy.close();
      catch(Exception ex){
        ex.printStackTrace();
}I need solution urgently. PLease help me.
With regards
Bina

Multi-Post
http://forum.java.sun.com/thread.jspa?threadID=731384&tstart=-1

Similar Messages

  • How can we see print preview when executing T Code?

    We create a one T Code . This T.code is assigned to one programme. Programme is assigned to one smart form. When I execute
    New T code . The system is asking input parameters than executing Tcode system is terminating the screen.

    Hi Go for RSMONICDP give timestamp and u'll have it.
    Please assign points if useful
    Edited by: Aadil on Jan 21, 2008 7:43 AM

  • I am unable to see print preview for my sales orders in VA03.

    Hi All,
    I am unable to see print preview for my sales orders in VA03.
    When ever i am selecting an order and from
    menu-> sales document-> issue output to
    it is raising information message on my status bar no output
    has been selected for printing.
    How can i view may print preview for sales order other
    than from va02/vao3.
    Can we view preview of a sales order if there is no output type is mapped to
    form. if yes can please give me the steps.
    Thanking in advance.
    Best Regards,
    TRS GUPTA

    Hi,
    Go to NACE transaction , from there choose the V1 application,now click on Output types. now see the Output types for print related.
    Now use them for your preview.
    you need to provide Output type  to view the preview
    May be you are missing some configuration(in your case Order type may be Z* so it requires Some Config ).
    Regards
    vijay

  • Not able to see Print Preview of Purchase Order.

    Dear All ,
                                                                       I m not able to see  the Print preview of Purchase Order , as the P.O is well release , but as i m click on Print Preview , an info displays in task bar , -> "  Error in OPEN_FORM for document 4501472103
    Message no. ME142
    Procedure
    Report the error to your system administrator.
    I request you to pl help how to fix this problem.
    Rgds,
    sap11

    thanx for your support , here i need to know one thing that i had gone to MN06 to display the cond. record , here for the output type i m using in P.O
    Given below different key comb. are maintained for same p.o , but as p.o was created then in message tab the first combination of fax was displayed and for this combi when clicking on print preview the message came for " Error in open _form " .
    1) P doc type / P. org./ Vendor =  Medium = 2 ( fax) / Date / time = 1 , is maintained
    2) P Doc. Type / P.org / Pgrp  =  Medium = 1 / date/ time = 1 is maintained.
    3)  P Doc. Type / P.org =         Medium = 1 / date/ time = 1 is maintained
    4)P org.                        =         Medium = 1 / date/ time = 3 is maintained
    Here my querry is that as medium = 1 ( print output ) is also maintain then why Other comb, were not triggered , why only Comb. for medium -=2 ( fax ) was trigered , and after that as i changed the medium to 1 , i m able to see print preview , why ?
    why i m not able to see p prwe for medium 2 ?
    Thanx n rgds,
    sap11

  • How  can I see the previews of my D610 in bridge cs5 and how can I open them in my CC photoshop?

    How  can I see the previews of my D610 in bridge cs5 and how can I open them in my CC photoshop?

    Nah. Raw support is version specific and that extends to Bridge as well. Older versions simply won't handle new cameras. If this is important to you, you will have to use Bridge CC.
    Mylenium

  • How to view Smartform Print Preview

    Hi,
    I have a Sales Order, Print output   is issued which has smart form  &  Print Program. Can you explain me how to view the print preview again for the Sale Order for which ouptut has been issued in ECC 5.0.
    Many Thanks
    Lakshmi

    Hi Atish,
    I did tried by going VA03 Screen & then Selected
    Extras- Output - Header - Print Preview from Menubar
    but no luck I cannot see  Print Preview of the output.
    Thanks
    Lakshmi

  • Unable to see print preview for Sales PDF form SLS_FORM01 SD_SLS_PRINT01

    Hi,
       I tried to use pdf forms for my sales print forms . I maintained standad driver program SD_SLS_PRINT01 and pdf form SLS_FORM01 in NACE. But i am unable to see print preview . But i am able to view standard purchase order pdf form MEDRUCK_PO . When i debugged the code, i found an excetion " %fpcomp_usage_error '039' textkey-name" , it gives style does not exists . The exception detail is as follows .
    Exception : USAGE_ERROR
    Message Id : FPUIFB  Message Number : 039 .
    Message : Text object doesnot exixts .
          Kindly guide me to overcome this issue .
    Thanks and Regards,
    S.Sivakumar

    this is no adobe specific error, it's from your application. You've some entries in your customizing so that specific texts are expected by the form.
    go to the context, search your text there and check wheter the checkbox "no error when text is missing" is activated or not...
    if the textbox is not activated but the text is missing --> thats the behaviour you have

  • How you will see reports last year and till date reports and compare?

    How you will see reports last year and till date reports and how you will compare?
    sridhar

    Hi.
        This you can achieve at query level.
    I have few question.. First let me know how many KFs you have in the query and based on what characteristic you want to compare the KFs.
    Let me assume that you want to compare "SALES" KF for the last and current year.
    1) Add the "SALES" KF to the Query.
    2) Rename it as "SALES - Prior Year"
    3) Copy the above KF and rename the new KF as "SALES - Current Year"
    4) In the "SALES - Prior Year", add the date (say, Calendar Date, Fiscal Period, etc.) as per yr requirement. Keep offset as "-1"
    5) Do the same for "SALES - Current Year" . No offset.
    6) Now create a new formula to find the difference between "SALES - Prior Year"  and "SALES - Current Year" .
    Hope you got some idea!!
    Let me know if anything more is required.
    Regards,
    Balaji V

  • How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA

    Hi All,
    Please let me know "How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA"
    Regards,
    Ganga.

    Hi ,
    pl go through this note "Integrating a virus scan into SAP applications 817623 "
    SAP Virus Scan Interface
    http://help.sap.com/saphelp_nw2004s/helpdata/en/30/42c13a38b44d5e8d1b140794e8e850/frameset.htm
    Sample Application
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6e1c4221-0901-0010-63ba-b1f9459d6e74
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2681486-0a01-0010-8497-c778eac80da5
    Regards
    Ayyappparaj

  • How can I see a preview of an image like in CS5?

    ok I open a folder to find an image and have no clue which one I want;  used to be I could click on an image and there would be a little preview of it at the bottom so I know what it is,  can't figure out how to do this in CS6,  I use it constantly so I need to know how to do it..  And no I am not talking about the bridge or mini bridge.  I want to be able to see an image while I am in "open" in the open window.  anyone know how to get this to work or if it doesn't, I am not gonna be happy lol.
    Tazz222

    It's gone. But the free SageThumbs adds previews back to the File Open windows. Note though that as installed it will only produce previews for files up to 20MB. You change this in Options. I have mine set at 80MB and as you can see below there is one preview missing - that file is 94MB.
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children

  • HP 8625, cannot see Print Preview or Select Pages

    On my new HP 8625, I cannot see the Print Preview feature nor can I select to print specific pages.  This used to work on my HP c309, so I'm thinking perhaps it's a printer driver issue.  I am specificially having this issue with Excel but it may be occuring in other programs as well.
    Any suggestions?
    Thanks for any info.

    Hello @TheEveryman , welcome to the forums
    I would first suggest checking to see if you have Print Preview and the option to print specific pages from other programs, besides Excel as this will show us if the problem is solely within MS Excel, or all programs, which could be a driver issue.
    Skipping forward a little bit and assuming the issue is in all programs, you could try Uninstalling the Printer Software, restarting the computer and reinstalling the printer, here: HP Officejet Pro 8625 e-All-in-One Printer Drivers.
    Please let me know which operating system you're running on your computer and the results from testing the other programs on your computer. The more detail you include, the better!
    Have a great day and hope to hear back from you
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • How to go for print preview option for locked/blocked items in PO.

    Dear all,
    Can we view PO even all the line items or some items in that PO are locked or blocked, by clicking Print preview button. If not by that button, is there any other way to view locked/blocked items in Print Preview format.
    Can anybody suggest me on this ?
    Thanks
    Hemanth

    Hi,
    Its not possible to see the line item in the print preview if it is blocked...
    You can only display in the PO only...why do you need Print preview of blocked items??
    Added on :
    You can check these locked details in the EKKO and EKPO table in the SE16 tcode for the respective PO and can also download the details if req. from the same table..
    Hope it helps..
    Regards
    Priyanka.P

  • Why cant i see print preview for HTML in English

    If I want to print a web page it does not appear in print preview nor will it print.
    It seems to have started this with FF5.0
    Win 7, FF 5.0, 8meg ram

    My problem was one of compatibility with HP smart web printing and FF5.0
    I disabled the add-on and all is well.

  • How to save a Print preview.

    Hello,
    I would like to know how i could save a Print preview in SAP R/3.
    Regards,
    Lina

    what do you mean by saving print preview of PO ??
    Its only Preview , you can not save it, you can take only printout

  • How can a view Print preview in TextEdit?

    I have never worked with a Macbook before so this is a little new to me. I just want to know how many pages of a document I have written. Or how I can "Print Preview" the doc. Thanks:)

    In the print window click on the "Preview" button.  At least that is the way it works in Snow Leopard and Epson printers.  Which os are you using and which printer?  You provided no system information.

Maybe you are looking for

  • Can I Globally Bind Fields in InDesign CS6 Forms?

    I'm used to using LiveCycle Designer to create forms, where I had a great deal of control over how the forms would look and feel and could create very complex interactivity. Particularly useful was the ability to create form fields that would repeat

  • SQl Server 2000 and Triggers

    Hello, I understand that a Trigger gets executed after a Insert, Update or Delete statement. For my project i have to load bulk data, for this reason i am creating a prepared statement. Now to my question, i wanted to find out if a trigger gets execu

  • WRT54GS Need Help

    Hi, I'm currently using a new Dell computer with a cable modem and Linksys router, WRT54GS with speed booster. The main computer is hard wired to the router and I have internet .  I have been trying to connect to the internet on my other wireless Del

  • Downloaded songs & CDs jumping

    Hi. I got a problem! When I import CDs or downloaded songs (not downloaded from iTunes store) in to my iTunes, they r jumping as if scratched when I play them back. This also happens when I play them back on windows media player. This only recently s

  • Tools for tracking web management tasks

    Sorry this is off-topic, but this is one of the few web development forums I can post to from my work PC due to filtering restrictions. It's on-topic from the point of view that we are a Dreamweaver development team. I am looking for input on a job t