Please help...excel to html

Dear,
I have a assignment about java. My platform is red hat linux, jsp, tomcat server. I don't know how to upload a excel file and display this in browser. The main problem is that how to convert excel file into html format or anyother method?
that is i want to display the excel file in jsp....Can anyone help me.
Please help me as it is very urgent. please!!
Thanks very much
joyce

Work assignment or homework for school?
joycejoyce, you're swallowing a lot here if you really are fresh to Java. Have you written any Java before taking on this assignment?
You sound like you're in a panic. Get a good book on servlets, like Jason Hunter's O'Reilly book or Marty Hall's "Core Servlets and JSPs" and start reading a little before you jump into a POI black hole.
No matter how desperate you are, you can't expect anybody watching this forum to just hand you a solution. You're going to have to do some work, and it's going to take time. Start reading, coding, and learning. Try to do something easy before you do something hard. Can you run Tomcat at all? Can you do a simple servlet and JSP and get them to work? That's a start. Do that before you tackle anything else.
JMHO. - MOD

Similar Messages

  • Urgent - please help with parsing HTML

    Hi,
    I'm very new to Java - i'm a biology major, actually, but taking this class for fun. Unfortunately, I'm having quite a bit of trouble with it. I've written a class that downloads a web page, converts it to a string, and then sends the string to another class, called BankRecord.
    The web page string looks something like this:
    bodylinks101>Prime Mortgage</a><br><span class=bodytext101>(909) 369-1012</span></td><td bgcolor=#e4e4e4 valign=top align=center><span class=bodytext101>4/18/2003</span><br><span class=bodytext101>10:15</td><td bgcolor=#e4e4e4 valign=top align=center><span class=bodytext101>5.875%</span>
    So, what I am trying to do is parse the HTML so that it returns, as a string, the appropriate information. For example, in the above HTML, I want "Prime Mortgage (909) 369-1012 4/18/2003" etc.
    The above is just one record, with several fields (bank name, phone number, date). The entire web page has quite a few records, for different banks, and I need to extract all of them. I think I've figured out how to find the start and end of the first record, but I don't know how to go about looking for more records. I'm guessing a loop? Also, how do I go about distinguish between the fields in each record (i.e., how to distinguish between phone number and date fields) Here is the code I have so far:
    import java.util.*;
    public class BankRecord
        //  Set up variables
        private String strContent;
        private Integer intPos;
        //  Constructor
        public BankRecord (String strVar)
             strContent = strWebPage;  // set strContent to incoming string
             intPos = 1;  // initialize intPos to 1
        public getNextRecord()
        // uses findBankStart to find next bank record; if found, return true.
        private findBankStart(intPos)
        // accept an integer indicating a place to start looking for beginning of each
        // bank record.  If there are no more records, return a -1; otherwise, return
        // starting position
             // Find beginning of record
             int intRecStart = strContent.indexOf("bodylinks101>",intRecStart);
             // Find end of record
             int intRecEnd = strContent.indexOf("bodylinks101>Apply",intRecEnd);
             // Find beginning of first field in record
             int FldStart = intRecStart + 13;
             // Find end of field in record
             int FldEnd = strContent.indexOf("<",intFldStart);
        public getField(intFldNum)
             // return the field asked for by number as a string.
    }PLEASE help as soon as possible...thank you very much.

    Thuyker,
    Here are 2 approaches:
    If you have a fixed format, parse via delimiters. For example, if each "record" is as follows:
    <span>Name</span><span>Acct No</span><span>balance</span>
    each "field" of the record is delimited by <span>...</span> tags. Thus, you could use regular old string functions such as indexOf() to read through the HTML string, and to pick apart the data you need.
    Alternatively, get a HTML parser, and let it do the work for you. A SAX-like one that I've used successfully is at http://www.quiotix.com/downloads/html-parser/
    --A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Please Help - Excel Cold Turkey

    Hi out there,
    I'm trying desperately to wean myself off Excel and onto Numbers.
    I have an excel spreadsheet that contains a table of all our regular monthly payments in date order with the date the payment goes out as a number then a description in the next column then the amount in the 3rd column.
    When I open the sheet, a cell contains the day of the month as a number (I can't even work out how to get todays date as a number that I can compare with in Numbers!)
    Then I use the following formula to calculate the remaining bills that are left for the month.
    =SUM((A3:A27>Current!D1)*(C3:C27))
    ie A is the column with the bill date (as a number from 1-31), Current!D1 is todays day number in the month and C has the amounts.
    When I imported the sheet into Numbers it didn't like the above formula. Can anyone tell me how I can achieve the same result in Numbers so I can get myself off of Excel?!
    Thanks in anticipation,
    Rob

    In Numbers, the conditional SUM function is called SUMIF. You can read about it in the Numbers 08 User guide PDF, or in the Numbers Help pages.
    If you don't care for that method, you can add a column in which you conditionally post the values and then SUM that new column.
    Regards,
    Jerry

  • Please help flash and html mix

    dear Sirs,
    I appreciate really your responses and help.
    i am trying to make a website that uses flash and html at the
    same time i mean only the menu is flash and the rest is html, the
    menu and all other parts are well put in table and rows, and cols
    but the problem is that i need the button in the menu(flash) to
    load dynamicly the content into the page and not reload the whole
    stuff(including the flash menu )
    thanks for your time

    > i am trying to make a website that uses flash and html
    at the same time i mean
    > only the menu is flash and the rest is html, the menu
    and all other parts are
    > well put in table and rows, and cols but the problem is
    that i need the button
    > in the menu(flash) to load dynamicly the content into
    the page and not reload
    > the whole stuff(including the flash menu )
    > thanks for your time
    Every time you open page, flash reload from scratch. That's
    how it works.
    You can use frames and keep the menu in frame, which would be
    easiest solution.
    Or you could use Shared Object, something like flash's form
    of cookies.
    Make a record every time you press button, read that record
    every time you
    open the page and based on result do something with the menu
    to indicate
    that this is the clicked location, tho take note, it still
    will be loading
    the file from zero, every single time you open new html page.
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Please help. excel file of unknown origin on desktop: can't move or delete, won't open or show info

    excel file of unknown origin on desktop: can't move or delete, won't open or show info.
    it is titled E4709E20
    I've never experienced this.
    It also doesn't show up in the finder window.
    Thank you.
    Paul

    Launch the Terminal application, copy or drag -- do not type -- the text below into the window, press return, and post the lines of output that appear below what you entered:
    ls -laOe@ Desktop

  • Excel Download of a Web SAP BW Report asks userid and password.please help

    Dear BW folks,
    Issue: When I run a specific SAP BW Report from Web and download the same into excel & csv.
    When I open the excel file downloaded, it asks me user name and password to enter. csv file downloaded doesn't ask.
    The report has 0cust_sales hierarchy and SBU hierarchy.
    Is there any thing to do with these hierarchies that the excel download is asking user name and password?
    Please help me out!!!!! This report needs to be downloaded into excel sent to my manager.....
    Regards
    Pavan

    Hi Pavan
    It is possible,please refer the below link
    Report execution without prompting user id
    Providing un-secured access to a web report.
    Also, for the time being, you can run the query and save a workbook and sent across
    These will resolve the issue
    Thanks
    Pavan Agarwal

  • I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Problem displaying an Excel File: Please Help

    Hello,
    I spent 3 hours this morning reading the forum on how to display an Excel file in the browser using JSP and I apologize in advance if the answer is in the forum.
    I cut and paste many examples: My goal is to display an excel file on the browser.
    Below is the code but the result is a disaster (please se after the code the result).
    My question is how can I display an excel file using the browser. What's wrong with my code. Apparently it worked for many people on the forum.
    Please help. I must do that by tomorrow and I had spent already so many hours.
    THANK YOU SO MUCH IN ADVANCE.
    So far the forum had helped me a lot.
    <%@ page language="java" import="java.io.*" %>
    <%
    String myfile = new String("/temp/temp.xls");
    File fileName = new File(myfile);
    // Setup our streams
    FileInputStream fis = null;
    ServletOutputStream out1 = response.getOutputStream();
    // Set content type and other response header
    response.setContentType(getServletContext().getMimeType(fileName.getName()));
    //response.setContentType("application/excel-document");
    //response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition","attachment; filename=\"" + fileName.getName());
    response.setContentLength((int) fileName.length());
    // Read in the file from the correct place and stream it to the user
    int iRead;
    FileInputStream stream = null;
    try
    stream = new FileInputStream(myfile);
    while ((iRead = stream.read()) != -1)
    out1.write(iRead);
    out1.flush();
    } catch (IOException i) {}
    %>
    RESULT:
    ������>�� �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� ���@����\p Yahel Malkin B�a�=���=��@�7 �������Oh��+'��0p08 P \h� Yahel Malkinn@�|�$�+�@�|�$�+�������.��+,��0�HP X`hp x ��� competitivePricingReportSave Worksheets���� ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Root Entry�������� �F��T�+�����Workbook������������SummaryInformation(����DocumentSummaryInformation8������������

    For those who are having the same problem than me here the solution:
    In fact I was only interested in saving the file
    <%@ page language="java" import="java.io.*" %>
    <%
    String myfile = new String("/temp/temp.csv");
    response.setContentType ("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment; filename=\""+myfile+"\"");
    int iRead;
    // Setup our streams
    FileInputStream fis = null;
    ServletOutputStream out1 = response.getOutputStream();
    FileInputStream stream = null;
    try
    stream = new FileInputStream(myfile);
    while ((iRead = stream.read()) != -1) {
    out1.write(iRead);
    out1.flush();
    } catch (IOException i) {}
    %>

  • Saving in Excel formatting the charts. please help...

    Post Author: ranjan.sahoo
    CA Forum: Deployment
    Hi,
         while i am trying to save the charts in Excel,its showing a deviation from .rep to .xls.
    Description about Chart:- Chart is like in Y axis we have percentage like 60%,80%,100%, in X-axis we Received Week.
    The Issue- Excel is automatically making an increment of unit length like its taking upto 120% as max.
    Also Excel is automatically formatting the legend making it TOP-BOTTOM rather LINERAR as in >rep file
    I have tried with all kinds of formatting in charts but its not reflecting. If you can help, I will be very helpfull.
    Please help me.
    Thanks,
    Ranjan

    Post your question on the MS Mac forums as it's their software you're having issues with:  http://answers.microsoft.com/en-us/mac?auth=1

  • I have a Excel file which has lots of PDFs embed as a link.  When i converting to PDF the embed links are not working. Please help to slove this issue.

    I have a Excel file which has lots of PDFs embed as a link.  When i converting to PDF the embed links are not working. Please help to slove this issue.e

    I am also looking alternative way using inDesign to create the embed link as like as excel. is there any possible? Thanks for you reply

  • I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothing.

    I upgraded to mountain lion a week ago and now on startup of my macbook pro, microsoft excel and word start up automatically and then crash? very strange can anyone please help? I have checked the login items under users and groups and there is nothing.

    Are you using the Office for Mac 2011 version, as you need to do?  The Office for Mac 2004 is Not at all compatible with Mountain Lion, and the 2008 version has been noted to have some problems running with ML.
    Hope this helps

  • Important Microsoft Office 2011 Excel File isn't opening Please Help!

    Hello everyone,
    I'm having problems opening one single excel file. I've tried others and they open with no issue. This file I'm trying to open now opened 2 days ago as it's a project I've been working on and I desperately need to get back to working on it!
    I'm running OS X 10.8.4 on a Macbook Pro with Microsoft Office 2011. When I open the workbook it loads the progress bar, then doesn't show anything from excel apart from the top bar with file/edit/view... etc
    When I try and open it from this point it gives me a message
    'XXX.xlsx is already open.
    Reopening will cause any changes you made to be discarded. Do you want to reopen XXX.xlsx
    PLEASE HELP and don't hesistate to ask for anymore information if you need it. Thank you.

    Such instances are examples of why one should maintain good backups.  I suggest you consider using Time Macnine backups.  It would allow you to go back in time to earlier versions of the file if a later one is corrupted or if you save unwanted changes by mistake.
    You would need a $80 external disk drive for the Time Machine volume.  Your data is much more valuable than that $80 cost.  Disks can fail at any time, taking all of your data with them.
    Time Machine Basics: http://support.apple.com/kb/ht1427
    Most commonly used backup methods: 
    https://discussions.apple.com/docs/DOC-3045

  • I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to customer. Can you please help me on the same?

    HI Experts,
    I have a scenario. Import IDOC into PI and PI transform IDOC to Excel. Using mail adapter attach that Excel using pi and send to vendor. Can you please help me on the same?
    Thanks
    SaiSreevastav

    Hi Sai,
    you can use XSLT or java mapping or adapter module to convert IDOC xml to XLS. Please refer the below blog
    Convert incoming XML to Excel or Excel XML – Part 1 - XSLT Way
    Convert incoming XML to Excel Sheet Part 2 – Adapter Module way
    Convert incoming XML to Excel Sheet
    then after converting to Excel, you can use the payloadswap bean in mail adapter
    XI: Sender mail adapter - PayloadSwapBean - Step by step
    regards,
    Harish

  • "File" and "View" are missing from the ribbon in Excel, MS Office 2011, please help!

    "File" and "View" are missing from the ribbon in Excel, I'm running MS Office 2010.  Please help!

    Post your question on the MS Mac forums as it's their software you're having issues with:  http://answers.microsoft.com/en-us/mac?auth=1

  • PLEASE Help with HTML code for email background image...

    Hi there!
    i have a background image that I want to pop into an html email widget for the email's background...  here is the web link I created in Photoshop: file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/tileabl e-metal-textures-2.html
    If anyone could please help me out that would be AWESOME!  I've attached pics of the background & I'm using Infusionsoft email builder which allows for HTML widgets.  I have a code that I use for my landing pages & webforms which works, tried that but no dice!
    Any help would be much appreciated - I'm an html newbie!
    Here is the code that I use for landing pages & works great, tried it for the email & it was a fail:
    <style>
      #mainContent .background, {
          background: url('file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/ti leable-metal-textures-2.html') no-repeat center center fixed;
        background-size: cover;
    </style>
    <script src="file:///C:/Users/Rachel/Desktop/iMuse%20Clients/LeadMachine360/Email%20Signatures/ti leable-metal-textures-2.html">
    </script>
    <script>
      jQuery(document).ready(
          function(){
          jQuery(' table.bodyContainer').removeAttr('bgcolor');
    </script>
    thanks in advance!
    Muse

    Not sure what you expect. Your URL is absolute and pointing to a local file resource. It's not a proper relative HTML link. Beyond that it's toatlly unclear how you actually plan to load your image and where they are hosted, so nobody can tell you anything. Either way, there is an obviously painful lack of understanding of even the most basic web techniques, so the best advise anyone would give you is to spend some time with a web search and actualyl learn some of that stuff...
    Mylenium

Maybe you are looking for

  • Accidental wake ups and freezes

    Hello, I have a weird problem with my Macbook sometimes. When I put my laptop to sleep and close the lid sometimes it can wake up in the middle of the night and keep running till morning without any reason, causing high enclosure temperature. Resetin

  • Symbian S^3/Anna Calendar Meeting Request (Invitee...

    First... I want to explain how this came about. I've never sent out a Meeting Invite from my Nokia N8 (PR1.2) to anyone before. However, in the days of collaboration, people send & receive Calendar Appointments to and from different Email/PIM Clients

  • Lost game info

    I have an I-pod Touch 3rd generation and have approximately thirty games. I plugged the touch into my computer and the games were removed from the touch and showed up under applications on I-tunes. I synched the games back onto the touch but lost all

  • Where are the internet search engine bookmarks located

    simple & dumb question I know, but I'm new to mac and still discovering. Where is the folder which contains all the search engine bookmarks?

  • Time Machine - All or Nothing??

    So... I had TWO MBPs crash this week. One had screen death, the other (has been a real lemon from the beginning, 1 year old) HD crash. Almost everything is backed up on TM, thankfully. But - I need just a few files to do some work... and Time machine