Drawing an image in excel sheet using HSSF API

Hi All,
Can any one please help me.
I am facing an issue with excel sheet while drawing image using HSSF API.
I am doing autofit for all the cells i have added. But the image is stretching along with the expanded cells.
I want the autofit option to work but the image should not stretch. Image should be the same size as is but the cells must expand.
Thanks in advance

Hi Santosh
You can export the report to PDF
Else you can manually copy the logo\image to excel sheet.
Hope it will help.
Regards
Kultar

Similar Messages

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • Image in excel sheet using macro in deski

    When I save deski report as excel then I don't get logo and Images in excel format. Can anyone help me on this.
    Thanks,
    Santosh

    Hi Santosh
    You can export the report to PDF
    Else you can manually copy the logo\image to excel sheet.
    Hope it will help.
    Regards
    Kultar

  • Saving excel file using HSSF api

    I am using HSSF api to download an excel file. But the end users are not able to save the file. Some of them do not get the popup file download window so that they can choose to open or save. Is there a setting in the browser which shows up the window? The users may have different versions of excel on their pcs.
    How to show the excel application menu 'file' so that users can save this file?
    Any help would be appreciated.

    Prakash,
              I have followed your weblog and set the content dispostion.
    HttpServletResponse res = request.getServletResponse(true);
                   try {
                        res.setContentType("application/vnd.ms-excel");
                        res.setHeader("Content-disposition", "inline; filename=report.xls");
                        wb.write(res.getOutputStream());
                   } catch (Exception e) {
                        e.printStackTrace();
    When I test this on my pc, I get file download window and I can choose 'open' or'save'. I also have tested this on some of my collegues PCs successfully. But the some of the end users are not getting this window.
    when the same is file is downloaded by running an asp page the enire MSExcel application with standard tool bar and menus(file edit etc..) is showing up.
    Why is it not poosible to get the same result using HSSF api?

  • Help:NoSuchMethodError thrown when reading excel sheet  using jxl API

    I'm trying to read data from an Excel-2003 sheet using this code:
    15. File file = new File("EmpDetails.xls");
    16. jxl.Workbook workbook = jxl.Workbook.getWorkbook(file);                              
    17. jxl.Sheet sheet = workbook.getSheet(0);
    18. jxl.Cell cell1 = sheet.getCell(0,0);I'm getting this java.lang.NoSuchMethodError: common.Assert.verify(Z)V. The StackTrace is given below:
    Exception in thread "main" java.lang.NoSuchMethodError: common.Assert.verify(Z)V
         at jxl.read.biff.SSTRecord.getString(SSTRecord.java:417)
         at jxl.read.biff.LabelSSTRecord.<init>(LabelSSTRecord.java:56)
         at jxl.read.biff.SheetReader.read(SheetReader.java:306)
         at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:611)
         at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:204)
         at com.scjp.IO.ExcelJXL.main(ExcelJXL.java:17)Please help.

    Thanks a lot for the reply.
    I had both jxl.jar and xlrd.jar in the classpath and xlrd.jar was loaded before jxl.jar.
    There is a conflicting common.Assert.class file in xlrd.jar and there is no verify method in it.
    That was creating the problem. I loaded the jxl.jar file before the xlrd.jar and it is working fine.
    Thanks a lot for the help!!! :)

  • How to append in excel sheet using Java

    Can anybody help me out in figuring out as how to append in already existing excel sheet using Java.
    I am able to to write in the existing excel sheet using HSSF but is not able to append the data row wise.
    So plz tell me how to do the same.

    Manisha_7 wrote:
    Thnx for the link......No problem.
    but i alsot wanted to know if apart from using poi there is a way to append the data in excel sheet like using JExcel.Don't know. JExcel is also not apart of Java's core API.

  • How to add an image in Excel sheet

    hi,
    I cannot add an image in excel sheet. i have used apache POI for writing data in excel sheet. But i cannot add an image in excel sheet.
    Please help me about this
    Thanks
    Bina

    From
    http://jakarta.apache.org/poi/hssf/quick-guide.html#Images
    Images are part of the drawing support. To add an image just call createPicture() on the drawing patriarch. At the time of writing the following types are supported:
    PNG
    JPG
    DIB
    It is not currently possible to read existing images and it should be noted that any existing drawings may be erased once you add a image to a sheet.
        // Create the drawing patriarch.  This is the top level container for
        // all shapes. This will clear out any existing shapes for that sheet.
        HSSFPatriarch patriarch = sheet5.createDrawingPatriarch();
        HSSFClientAnchor anchor;
        anchor = new HSSFClientAnchor(0,0,0,255,(short)2,2,(short)4,7);
        anchor.setAnchorType( 2 );
        patriarch.createPicture(anchor, loadPicture( "src/resources/logos/logoKarmokar4.png", wb ));

  • The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0

    The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0. We have already installed an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed
    to help the synchronization of excel to Sharepoint, but it did not work. We would like to synchronize information about a calendar from excel to Sharepoint 3.0, so every time a change is made in excel it automatically updates in Sharepoint.

    ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Upload Excel sheet using Data Integrator 6.1?

    hi all ,
    Upload Excel sheet using Data Integrator? and how to create ODBC for the PC and jobserver i am using version 6.1? i am using excel as my one of the data source and tell me how to use different types of data sources in DI . after uploading the xl file if i apply any transform on the excel data i will give error like
    Posted: 25 Sep 2008 04:30
    Post subject: Re: Upload Excel sheet using Data Integrator? 
    I am getting the error like
    3128 292 CON-120302 09-25-08 09:59:40 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    3128 292 CON-120302 09-25-08 09:59:40 default driver specified>. Notify Customer Support.
    1512 2992 CON-120302 09-25-08 09:59:41 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    1512 2992 CON-120302 09-25-08 09:59:41 default driver specified>. Notify Customer Support.
    Please help me out
    Thank u

    Hi Shonti,
    The DI 11.7 installer can be used to upgrade a DI 6.1 local repository (e.g. the upgrade is supported).  This will migrate all jobs and flows.  They will remain intact, however, this is always a major migration effort and should not be taken lightly.  If you do upgrade, please make sure this is a planned effort with rigorous testing and validation.  You should also ensure that you consult the release notes and [supported platforms documentation|https://websmp110.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000712240&_SCENARIO=01100035870000000202] for the 11.7 package you intend to install.  The DI 11.7 documentation also contains info about how to install and configure the Excel Adapter, and what functionality it provides.
    Thanks,
    ~Scott

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

  • Generating Excell Sheet using Reports 9i

    Hello,
    I wanna know how can I do to generate one excell sheet using reports, without
    use the option that4s generate text file using tab. I wanna know if someone have
    example codes, or library4s.
    Thanks,
    Paulo Sergio

    Here are some notes we created from the demo below. This works great for generating true formated excel output in 9i Reports using 9ias Rel2.
    Notes from
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    Output to Excel with Oracle9i Report
    1.     Create an Excel template for the report. It should contain generic information such as title, logo and column headers
    2.     Cretae a sample line of data in the spreadsheet
    3.     Save the Excel spreadsheet as a Web page. File | Save As Web Page
    4.     Open the Web page you just created in Reports Builder
    5.     Double-click on Web Source node to display the HTML code for the Excel spreadsheet
    6.     Note how Excel generated HTML and XML code for the spreadsheet you created. Reports Builder also adds its own JSP tags
    7.     Add the Data Source An SQL Query
    8.     Modify the Web Source. Now that youve written the query, you can modify the Web source to tell Reports Builder to display your report in Excel.
    9.     Click on the Web Source icon in the toolbar.
    10.     To force the browser to open MS Excel it is necessary to change the HTTP Content Type to a specific MIME Type:
    application/vnd.ms-excel
         Insert the following line immediately before the <rw:report id=report> tag
              <%@ page contentType=application/vnd.ms-excel %>
         (This is a standard JSP directive to set a MIME Type (Content Type) )
    11.     To respect Excel format, you should delete the blank lines above the <html> tag.
    12.     Now, use Oracle 9i Reports JSP tags to add the data retrieved by your SQL Query to the report.
    13.     Search for the sample line of data you added to your Excel spreadsheet
    14.     Each line is saved as an HTML Table Row tag ( <tr> ).
    15.     Each column is mapped as an HTML Table Data tag ( <td> ).
    16.     Using Reports JSP Tags, add a Reports repeating frame tag to loop around the Data Model group.
    17.     To help, show the Object navigator next to the Web Source Window. All group information is now visible in the Object Navigator
    18.     Enclose the sample line of code in the Web source with the Reports9i JSP repeating tag.
    Use from menu Insert | Repeating Frame at beginning of sample
    Move the closing repeating tag after the </tr> tag.
    Start of the repeating tag would be
    <rw:foreach id=foreach src=>
    Ending of the repeating frame would be
    </rw:foreach>
    19.     In the opening of the repeating tag (<for each>), add the name of the group the tags enclose. JSP custom tags require a unique identifier.
    For example: <rw:foreach id=gEmpNoId src=G_EMPNO>
    20.     Now, map the cells of the Excel spreadsheet to the corresponding field from your data model.
    Select on the data value. From menu select Insert | Field. The source of the tag is the name of the field in the query.
    21.     Repeat the operation for each field of the report. Note: do not forget to specify a unique identifier for each field.
    22.     The code now contains a repeating frame. You have also mapped each cell in the Excel spreadsheet to the corresponding field in the data model
    23.     Save the report as a Reports JSP. You can test the report using the Run Web Layout icon in the toolbar
    24.     The execution of a Web Layout report from Reports Builder creates a temporary HTML file and launches the browser. The browser does not launch Excel because the document is saved as an HTML file. To launch Excel from the browser you need to test it from Reports Server.
    25.     In order to have the report appear inside Excel, you need to execute it with the Reports Server under OC4J. To do this you need to:
    First, start an OC4J instance from Oracle 9iDS see How to Execute Reports Services from Oracle 9iDS on OTN. Then, copy the JSP to a directory. For example: $IDS_HOME/reports/j2ee/reports_ids/web/test
    26.     Enter the URL to execute the jsp. The JSP is executed from an OC4J instance.
    http://reports9iTestServer:8888/reports/test/ListOfEmployees.jsp?userid=scott/tiger@ora901
    27. The browser launches Microsoft Excel and displays the data from your report.

  • Can we create Multi Tabbed excel Sheet using Crystal Reports 2008

    Hi,
      We want to create a Crystal Report which will export the output as multiple Tab's ( we can use sub reports).  Can we create a Multi Tabbed excel Sheet using Crystal Reports 2008 ( not  Crystal reports Basic 2008). Please share any information/links on how to do that.
    Also if it is not supported please let us know which version supports it.
    Thanks,
    Vasu

    At least one of the 3rd-party Crystal Reports Desktop Scheduling tools listed at: http://www.kenhamady.com/bookmarks.html provides that functionality.  It allows you to burst a single report so that each Group at level 1 becomes a separate tab.  You can control the tab names (and tab colors) via fields/formulas inside the report.
    You can also automate the process of exporting to (and also replacing or appending to) specified tabs inside existing workbooks.

  • Is it possible to create Excel Sheet using OLE automation in App server

    Hi,
       Is it possible to create Excel Sheet using OLE automation in Application server(Open Dataset)
    Thanks in advance...

    Unless your application server is on Windows OS, or it is connected to a Windows server by RFC. What is the requirement exactly, I don't understand?

  • Conneting the microsoft excel sheet using jdbc

    HI all
    my requirement is to connect to the excel sheet using the jdbc odbc dsn and read the worksheets and get the data.
    i have created the dsn using vb scripting
    so when i click on a button. a dsn is created dynamically and the same dsn is passed as parameter to the system which will call a java program
    the java program will us the dsn to connect to the excel sheet to read the data.
    This is working fine
    the problem is sometimes the following exception is raised.
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.zt.ebiz.install.client.ExcelDriver.getConnection(ExcelDriver.java:290)
    at com.zt.ebiz.install.client.ExcelDriver.getHostInfo(ExcelDriver.java:337)
    at com.zt.ebiz.install.client.InstallClient.executeActions(InstallClient.java:188)
    at com.zt.ebiz.install.client.InstallClient.main(InstallClient.java:123)
    For this we are just restarting the system.
    Again it works fine.
    i would like to know the cause of this problem.
    please help me in this
    thanks
    Vijay Sunder

    It may be occured because of connection closing, make it sure to close connections after your transactions completed.

Maybe you are looking for

  • Dynamic SQL and Bulk Bind... Interesting Problem !!!

    Hi Forum !! I've got a very interesting problem involving Dynamic SQL and Bulk Bind. I really Hope you guys have some suggestions for me... Table A contains a column named TX_FORMULA. There are many strings holding expressions like '.3 * 2 + 1.5' or

  • Can anybody tell me the program behind Tcode S_ALR_87012078

    Hi, can anybody tell me the program behind Tcode S_ALR_87012078 The program I find is GP1M8IJ5LO18YK19QBZLF70R92P. when I copied to another report and executing it . I find a slight different input screen what I get from the standard Tcode. Regards M

  • Picking files from multiple folders based on name send to destination folde

    Hi,    I want to pick multiple files from multiple folders with one root folder. Based on file name I want to send it to diffirent folders. No need to go for message mapping. Can anyone suggest me. Thanks & Regards, Prasad Kotla.

  • No login window after 10.9.3 update

    Hi, after 10.9.3 update installation I don't see login panel after installation. I cleaned NVRAM, I runed my MBP in safe mode and nothing. Only coursor and screen with apple. Please, help me, I can't work

  • Components in the namespace not editable

    Dear friends, I've used NWDI / CMS to transport a namespace from DEV to QaS and eventually to PROD. Everything looks fine the only thing is that the namespace has now the status not editable in DEV, so I cant edit anything in that namespace. Can you