Displaying an Image in an Excel Spreadsheet with JSP - URGENT

Hi Peoples
I can transfer the table I am using in to excel with JSP by doing:
<%@ page contentType ="application/vnd.ms-excel" %>
this works fine, though I have an image that sits within the table that I want to be displayed as well.
Can this be done?? If so how???
Thanks

Try to insert the image into sheet from it's URL not from it's local file path
Best regards

Similar Messages

  • Excel spreadsheets with macro's

    Good day
    Excel spreadsheets with macro's created in Windows does not work on my Macbook (excel for mac 2011), even if I enable macro's. I do not create these spreadsheets myself. Cn anyone assist please? Thank you for your time.

    Hi,
    As far as I known, the macro/Active X control can be used well with both of the Office 2013 and Office 365.
    Would you like to share us a sample file that created in Office 2013? I'd like to test it. You can send it via Email ([email protected]).
    If you have any update, please feel free let us know.
    ===========
    Update:
    I have received your mail and
    attachment. Then, I tested it, I found the probably reason.
    You were using ActiveX controls in the sample file, and them displayed 4 tabs in Format control dialog box. Next, you created a new Form control, it displayed 7 tabs.
    You were using the two type of controls. ActiveX controls and Form controls
    are different.
    Form controls
    Form controls are the original controls that are compatible with earlier versions of Excel, starting with Excel version 5.0. Form controls are also designed for use on XLM macro sheets.
    ActiveX controls
    ActiveX controls can be used on worksheet forms, with or without the use of VBA code, and on VBA UserForms. In general, use ActiveX controls when you need more flexible design requirements than those provided by Form controls. ActiveX controls have extensive
    properties that you can use to customize their appearance, behavior, fonts, and other characteristics.
    For more detail information, please refer to the following link:
    https://support.office.microsoft.com/en-us/article/Overview-of-forms-form-controls-and-ActiveX-controls-on-a-worksheet-d101804a-0f84-43ad-8cb2-e19277b8e3fb?CorrelationId=0e7129b7-8ea2-458c-af14-a99292d300b9&ui=en-US&rs=en-US&ad=US
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How do I fill an Excel spreadsheet with the contents of a DataTable? (C#, OleDb)

    The following fills a DataTable with the contents of an Excel spreadsheet.
        oledbCmd.CommandText = "SELECT * FROM [" + stSheetName + "$]";
        DataTable dtDataTable = new DataTable();
        using (OleDbDataAdapter oledbAdapter = new OleDbDataAdapter(oledbCmd))
        oledbAdapter.Fill(dtDataTable);
    How do I fill an Excel spreadsheet with the contents of a DataTable?
    bhs67

    You can try this Excel library, it can help u to
    export datatable to excel to Database.
    After add the reference to your project ,add the following code:
    private void button1_Click(object sender, EventArgs e)
    //connect database
    OleDbConnection connection = new OleDbConnection();
    connection.ConnectionString @"Provider=""Microsoft.Jet.OLEDB.4.0"";Data Source=""demo.mdb"";User Id=;Password="
    OleDbCommand command = new OleDbCommand();
    command.CommandText = "select * from parts";
    DataSet dataSet = new System.Data.DataSet();
    OleDbDataAdapter dataAdapter = new OleDbDataAdapter(command.CommandText,connection);
    dataAdapter.Fill(dataSet);
    DataTable t = dataSet.Tables[0];
    //export datatable to excel
    Workbook book = new Workbook();
    Worksheet sheet = book.Worksheets[0];
    sheet.InsertDataTable(t, true, 1, 1);
    book.SaveToFile("insertTableToExcel.xls");
    System.Diagnostics.Process.Start("insertTableToExcel.xls");
    http://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Data-Export-/Import-Export-Datatable-to-Excel-from-Database.html

  • EXCEL spreadsheet with MACROS

    WILL NUMBERS 2009 SUPPORT AN EXCEL SPREADSHEET WITH EMBEDDED MACROS?

    Looks like Excel will get macros back. This is from Wikipedia:
    Microsoft has announced that the Mac OS X version will also be released in 2010. Microsoft Office 2011 for Mac will include more robust enterprise support and greater feature parity with the Windows edition. An all-new version of Outlook with full Exchange support will return to the Mac for the first time since 2001 and replace Entourage[47], and Visual Basic for Applications (VBA, aka "macro" support) will return after being dropped in Office 2008[48][49]. There is no public beta for the Mac version,[50] however, a copy of Beta 2 (Build 14.0.0.100326) has been circulated among many Mac file sharing websites. [51]

  • C# Script to open and read an Excel spreadsheet with multiple worksheets

    Can someone provide me the C# syntax and Edit Script to open an Excel spreadsheet with multiple worksheets and then using the data to create and output a .csv file? The multiple worksheets contain different data elements that I'll need to parse out and then
    store as a .csv file that will then be read to pump data into our SQL Server Database.
    Thanks for your review and am hopeful for a reply.
    PSULionRP

    I think this code originally came from Joel, who comes here quite a bit.  I'm not a C# expert, like Joe is, but I think this is pretty close to what you want.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    using Microsoft.Office.Interop.Excel;
    using System.IO;
    namespace WindowsFormsApplication2
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Main();
    public void Main()
    string filePath = "C:\\Users\\Ryan\\Desktop\\MainExcel.xlsx";
    Microsoft.Office.Interop.Excel.Application xlobj = new Microsoft.Office.Interop.Excel.Application();
    Workbook w = default(Workbook);
    Workbook w1 = default(Workbook);
    Worksheet s = default(Worksheet);
    Worksheet s1 = default(Worksheet);
    Worksheet xlsht = default(Worksheet);
    xlobj.Visible = true;
    int intItem = 1;
    DirectoryInfo dirSrc = new DirectoryInfo(@"C:\Users\Ryan\Desktop\Test_Folder\");
    foreach (FileInfo ChildFile in dirSrc.GetFiles())
    try
    // Renaming the excel sheet
    w = xlobj.Workbooks._Open(ChildFile.FullName,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    Type.Missing, Type.Missing);
    w1 = xlobj.Workbooks._Open(filePath,
    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 doesn't make any sense
    //w1 = xlobj.Workbooks.Open(filePath);
    //if (intItem > 3)
    Excel.Worksheet lastSht =
    (Excel.Worksheet)w1.Worksheets[w1.Worksheets.Count];
    xlsht = (Excel.Worksheet)w1.Worksheets.Add(Type.Missing,
    lastSht,
    Type.Missing, Type.Missing);
    s = (Excel.Worksheet)w.Worksheets[1];
    s1 = (Excel.Worksheet)w1.Worksheets[intItem];
    s1.Name = ChildFile.Name;
    // it will copy and paste sheet from one to another with formula
    s.UsedRange.Copy(Type.Missing);
    Excel.Range r = s1.get_Range("A1", Type.Missing);
    r.PasteSpecial(Excel.XlPasteType.xlPasteValues,
    Excel.XlPasteSpecialOperation.xlPasteSpecialOperationNone,
    Type.Missing, Type.Missing);
    s1.UsedRange.Formula = s.UsedRange.Formula;
    // Renaming the excel sheet
    //w.Save();
    w.Close(false, Type.Missing, Type.Missing);
    w1.Close(false, Type.Missing, Type.Missing);
    catch (Exception ex)
    //w.Save();
    w1.Save();
    w.Close(false, Type.Missing, Type.Missing);
    w1.Close(false, Type.Missing, Type.Missing);
    intItem = intItem + 1;
    //Dts.TaskResult = ScriptResults.Success
    Do you need help getting everything into a CSV, or can you take it from here???
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Automatically open excel spreadsheets with numbers

    can anyone tell me is it possible to set numbers as the default application to ALWAYS open excel spreadsheets? each time i try to open an excel spreadsheet the computer starts up the trial office software. I then have to cancel and choose "open with" and then set "always open with" numbers.
    Having just converted from Windows, I was able to set certain programs to always handle specific file formats, e.g. .jpg, mpeg, avi so I did not have to choose the program every single time i wanted to open a file.
    thx., same goes for pages ,in lieu of word?

    Select an Excel file and option-select (Right Mouse Button) and select Get "Info". See attachment below to set "Open With."
    Regards,

  • Is it possible to use a content query web part to pull and display rows/items from an Excel spreadsheet saved in a SP library?

    I have an Excel spreadsheet that I want to upload to an SP library. Is it possible to display these items (in a non-excel format, more like an SP list format) in a web part? 

    Have you tried using the Excel web part
    Display Excel content in an Excel Web Access Web Part

  • Display multiple Images from a DB on a JSP Page!

    Hi all, please give me your solution, thanks. I have many images, stored in Oracle database (BLOB), How to display all of them (images) on a JSP page? I have a working solution that only shows one image based on the specific image-name passed. But if no image found in the Database with that image-name then I want to show all the images at once on a JSP page. Can someone help please. Follwing are the code snippets:
    Here is the JSP page that calls the servlet to show the images:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
        <title>untitled</title>
      </head>
      <body valign=center>
          <table>
            <tr>
                <td>
                    <img src="/test-testimgs-context-root/servlet/test1.images.servlet.GetImage">
                </td>
            </tr>
          </table>
      </body>
    </html>
    Here is the code that resides in the service method of GetImage servlet:
    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        OutputStream stream = response.getOutputStream(); 
        Blob imgBlob = null;
        ResultSet rs = null;
        byte[] imbBytesAry = null;
        try
            ImageTest imgtest = new ImageTest();
            rs = imgtest.get("img1.tif");
            if(rs != null)
                while(rs.next())
                    imgBlob = rs.getBlob(1);
                    int len = new Integer( new Long( imgBlob.length()).toString() ).intValue();
                    imbBytesAry = imgBlob.getBytes(1,len);
                    if (imbBytesAry.length == 0 || imbBytesAry == null)
                        noImageFound(request, response); 
                    else
                        stream.write(imbBytesAry);
            else
                noImageFound(request, response);
        catch (Exception e)
            noImageFound(request, response);
    Here is the code that resides in the get method of ImageTest class:
    public ResultSet get(String fileName) throws DatabaseConnectionException, SQLException, Exception
    Connection connection=null;
    ResultSet rs = null;
    ResultSet rs1 = null;
    Blob imgBlob = null;
    try
        connection = new ConnectionProvider().getCConnection() ;
        connection.setAutoCommit(false);
        Statement stmt = connection.createStatement();
        String sql = "SELECT IMG FROM IMAGE_TABLE WHERE IMAGE_NAME = ? "; 
        PreparedStatement pstmt = connection.prepareStatement(sql);
        pstmt.setString(1,fileName);
        rs = pstmt.executeQuery();
        boolean flag = rs.next();
        if(flag)
            rs.beforeFirst();
        else
            sql = "SELECT IMG FROM IMAGE_TABLE"; 
            rs1 = stmt.executeQuery(sql);
            boolean flag_all = rs1.next();
            if(flag_all)
                rs1.beforeFirst();
            else
                rs1 = null;
        return rs;
    }As you see in the JSP page I am calling GetImage servlet, whose service method does all the processing i.e. calls ImageTest get method that queries the database and returns the result. Eventually what I would like is to pass the filename along with other parameters from JSP page and the servlet returns the images based on that. Currently I have just hard coded a value for testing puposes. Any help is appreciated.
    Thanks

    Hi all, please give me your solution, thanks. I have many images, stored in Oracle database (BLOB), How to display all of them (images) on a JSP page? I have a working solution that only shows one image based on the specific image-name passed. But if no image found in the Database with that image-name then I want to show all the images at once on a JSP page. Can someone help please.
    this is the code
    <form name="a" action="" method="post">
    <%
    rs1 = st1.executeQuery(select1);
    rs1.next();
    while(rs1.next())
    %>
    <table>
    <tr><td>
    <%
    Blob objBlob[] = new Blob[rs1.getMetaData().getColumnCount()];
         for (int i = 0; i <= rs1.getMetaData().getColumnCount(); i++)
               objBlob[i] = ((OracleResultSet)rs1).getBLOB(1);
              InputStream is = objBlob.getBinaryStream();
    byte[] bytearray = new byte[4096];
    int size=0;
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=getimage.jpeg");
    while((size=is.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size);
    response.flushBuffer();
    is.close();
    out.println("hhhhhhh");
    %>
    </table>
    <%
    rs1.close();
    //con.close();
    %>
    </form>

  • How Can i do a excel graphic with jsp?

    have to create an excel graph in jsp taken there values of a database.
    thanks a lot,
    Federico.

    "is used to spawn Excel from a JSP page, from the output of a HTML table but i dont know how (or if you can) to manipulate Excel through java so that you can get a chart."
    Let me rephrase this hehe =P
    You create an HTML table from the data you pull from the database. You then use the setContentType
    <%
    response.setContentType("application/vnd.ms-excel");
    %>
    this is to tell the browser it should look for Excel on the client machine, to dispay the output.
    Again i hope this helps even a little =)

  • Can not import excel spreadsheet with more than one spreadsheet from an email

    i get excel files sent to me all the time by email and have been able to open most of them.  Went to a apple store and was told i needed to install numbers app on my iphone 4 to open them up because their was more than likely two or more work sheets in that file. i am on the road and can't get to my imac.  I bought numbers did all the updates on the iphone and sync to itunes.  it still cant open the spreadsheets if they have more than one work sheet. it does ask do you want to open in numbers i answer the question it starts the import then get error message spreadsheet couldn't be imported.  the file format is invalid.
    this is frustrating to by an app that was suggested by apple for the solution and it doesn't work.
    by the way i have excel on the macbook pro and imac so that is not an issue need to be able to see on the phone while traveling.
    by the way it says microsoft excel 97-2004 worksheet 16 kb open in "numbers"
    Any suggestions

    Hi Caroline
    you should be able to apply the exact same principles to your multi query report. The XML will have a main root node and then the results of the queries underneath.
    So if you had 3 queries you'd get something like
    <REPORTNAME>
    <G_FIRST_QUERY>
    </G_FIRST_QUERY>
    <G_SECOND_QUERY>
    <G_SECOND_QUERY>
    <G_THIRD_QUERY>
    <G_THIRD_QUERY>
    </REPORTNAME>
    In the template you will be able to map on to the separate sections of the XML very easily.
    regards, Tim

  • Will iPad display microsoft power point presentations? And will it display excel spreadsheets?

    I am contemplating purchasing an iPad to use at work, however we use a lot of microsoft poer point and excel and I need to be compatable with the rest of the office. Will iPad display Power Point presentations and excel spreadsheets?

    I wanted to edit my post for you but you read my post right away ---- anyway - right out of the box - these are the file formats that the iPad can read as mail attachments. If you want to save and edit the files - you will need to purchase a third party app that is compatible with those files.
    Viewable document types: .jpg, .tiff, .gif (images); .doc and .docx (Microsoft Word); .htm and .html (web pages); .key (Keynote); .numbers (Numbers); .pages (Pages); .pdf (Preview and Adobe Acrobat); .ppt and .pptx (Microsoft PowerPoint); .txt (text); .rtf (rich text format); .vcf (contact information); .xls and .xlsx (Microsoft Excel)

  • How do I display a few cells from an excel spreadsheet

    Can a page be created that sets a field that displays
    information located in an excel spreadsheet located on a different
    server?
    Basically there is a cell within an excel spreadsheet that
    gets updated daily, and I want the coldfusion to reflect the change
    real time.
    I can see the excel file using this code:
    <cfhttp method="get" url="
    http://test/test.xls"
    throwonerror="yes">
    <cfoutput>#CFHTTP.filecontent#</cfoutput>
    </cfhttp>
    But it shows up as a bunch of gobblygook on the screen. How
    can I detail it down to only 2 cells in the spreadsheet, and make
    it look normal?

    If you know Java, you can use POI:
    http://jakarta.apache.org/poi/
    It's fairly easy to use, but I haven't written anything
    that's general enough to do something like "Give me cell A2 from
    this Excel file". Everything I've done with it has been specialized
    to the specific task at hand.

  • How to generate an excel spreadsheet from an Oracle Application forms runni

    I need URGENT generate an Excel spreadsheet with rows and columns populated from a forms that is running on Oracle Application R11.5 and open this worksheet for the User save.
    I want to include a PL*SQL code on a button and this button to run the spreadsheet open save for the User.
    Sorry my poor English, thanks for the comprehension

    909356 wrote:
    I need URGENT generate an Excel spreadsheet with rows and columns populated from a forms that is running on Oracle Application R11.5 and open this worksheet for the User save.
    I want to include a PL*SQL code on a button and this button to run the spreadsheet open save for the User. This functionality is already available in the application (File > Export) and you do not need to write a code to do that.
    How To Export Form Data To a CSV Format File [ID 779079.1]
    How To Setup Action Export Functionality in Release 11i [ID 136074.1]
    Thanks,
    Hussein

  • Sharepoint: Syncing dates in excel columns with Project calendar.

    Hi
    I am two questions if you have some time to answer:
    First question: I am trying to create a detailed workflow for a Document App.  I basically want to sync dates from certain columns from a number of SharePoint excel spreadsheets
    with the calendar on SharePoint for my project.  The dates in the excel spreadsheet will continually change depending on the progress of the project due to cell formulas therefore
    i need those dates to change also in theproject calendar.  I am not sure if this can be generated in a workflow (?) or indeed if this is possible at all???  
    I have tried to use the "Add a Workflow" link to try the above but it does not go into enough detail for me. I have SharePoint Designer installed but i am unsure of how to go about doing this.
    Second question: Is there a way to generate a workflow to sync tasks in the Tasks App assigned with "to be completed by" dates with the Project calendar?  I would like to be able to create a task, assign it to someone with a due date and then
    have that task appear in the project calendar.
    I would very much appreciate any help you could provide me with this.
    Thank you
    Ray

    Does anyone have any ideas on how to complete my task above???  I'd be grateful for any suggestions.
    Ray

  • Excel with JSP

    Hi everyone
    I relly do need some help...
    I have an Oracle Database and I need to:
    1. View my results (of any request) in an excel spreadsheet using JSP (I think this part is the easiest...)
    2. And that is my real problem: Use an excel spreadsheet to insert values in the database with JSP...
    I hope I made it clear because even for me it's really tricky...
    Thanks a lot...
    Yassi

    There is a example in Marty Hal;l's book"Core Servlets and JSP pages".
    It is static, but the same idea would work coming from a database.
    <HTML>
    <HEAD>
    <TITLE>Comparing Apples and Oranges</TITLE>
    </HEAD>
    <BODY>
    <CENTER>
    <H2>Comparing Apples and Oranges</H2>
    <%
    String format = request.getParameter("format");
    if ((format != null) && (format.equals("excel"))) {
    response.setContentType("application/vnd.ms-excel");
    %>
    <TABLE BORDER=1>
    <TR><TH></TH><TH>Apples<TH>Oranges
    <TR><TH>First Quarter<TD>2307<TD>4706
    <TR><TH>Second Quarter<TD>2982<TD>5104
    <TR><TH>Third Quarter<TD>3011<TD>5220
    <TR><TH>Fourth Quarter<TD>3055<TD>5287
    </TABLE>
    </CENTER>
    </BODY>
    </HTML>

Maybe you are looking for

  • Hard drive failure (why can't I start up with boot disk)?

    Running OS 10.4.6. I was getting flashing question mark at startup. Tried starting with Disk Warrior holding down "C" key. Got Apple logo, but then screen frooze with horizontal lines across screen. Rebooted, held mouse to eject disk. Tried TechTool

  • TS1541 new mac mini. woke it up from sleep mode, user password suddenly not working. ideas?

    After initial set up left the brand new mac mini for an hour or so. On return, the password that had been working thus far was entered but did not work. cannot now login to brand new mini. Ideas please?

  • Missed notifications ios7 & iPhone 5

    Hey all, I did a quick search and figured I'd ask. I has a sms failure notification on the missed tab. I went in the messages app and resent the message and everything was cool. However, I could not clear the notification off the bar. I even clicked

  • Variables In Captivate 5.5

    I created a user created variable, "Student Name", in my learning module.  When I launch the module through my lms, where is that user data stored?  Is it saved in RAM only or a temp file?  Or is it, or can it be written to a database?

  • Trouble getting a  cfm to pdf to show data

    using cf 5.o and here is my vnd.fdf code from the cf page we are creating the PDf but we cant get the data to show in the form fields in the created PDF is there some step we are missing? is there anywhere where there is some step by step documentati