Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel to access help (JSP)

    How should I do this?
    My project allows user to upload an excel from browser. After that, it creates a new table in an access file to store the excel data in it. Then display the data in that new table in a web browser.

    I already know how to get data from excel and then inserting it into the access file table. However the problem is that I want to display it in the browser as a table and have the same arrangements it has in the excel file, meaning if there are 3 columns, display 3 columns, if there are 5, display 5.
    I do not know how to construct the sql statement which will add the same number of columns the excel file has into access. But if there is a better way of doing it, please tell me.

  • #2
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    Quote Originally Posted by MythicZombie View Post
    I already know how to get data from excel and then inserting it into the access file table. However the problem is that I want to display it in the browser as a table and have the same arrangements it has in the excel file, meaning if there are 3 columns, display 3 columns, if there are 5, display 5.
    I do not know how to construct the sql statement which will add the same number of columns the excel file has into access. But if there is a better way of doing it, please tell me.
    This is all unecesary , that is converting to access, if you are just displaying exactly what it is in excel file. Read from excel and display as html table.

    I see it is a big hole i your knowledge, will give you a peace of code , doh doubt it will help, mybe will give you some ideas:

    This is connected to mysql, in your case it should be to msaccess
    Code:
    mc.mysql.mysqlconnection con = new mc.mysql.mysqlconnection(this.getClass().getName());
    con.setDataSet("the SQL statement that you have no idea how to write it, nither do I as I know 0 about your table");
    con.rs.beforeFirst();
        while(con.rs.next())
        {
        %>
          <tr>
            <td>
              <%=con.rs.getString("some column_name_from_your_acces_table")%>
            </td>
            ...
         %>
    Last edited by BubikolRamios; 01-10-2011 at 08:13 PM.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •