www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: how to embed excel spreadsheet in webpage

  1. #1
    Join Date
    Aug 2010
    Posts
    18

    Smile how to embed excel spreadsheet in webpage

    hi i want to embed an excel spreadsheet in webpage, so if any time i will replace the excel file in my directory, the webpage will automatically show the new file data.
    what i need to update webpage data?? it will be an escel file, when i update that or replace that the webpage will be automatically update..
    give your solutions...

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    This is way simple if the server is running on a Windows box. Otherwise you'll want to save that Excel as CSV. In either case the real work will be done with some server side scripting. Find out what you can about the server and then post your question to the forum for your chosen scripting language.

  3. #3
    Join Date
    Sep 2010
    Posts
    1

    embedding excel

    If you don't want to use server side, then instead of embedding excel you can copy paste your excel data on to the design view of dreamweaver and it will automatically make a html table for you. Here you can provide appropriate css properties to the table and make it look like an excel sheet. This would include giving a border and color.

    also u can use html 5 which gives an option to include excel sheets.

  4. #4
    Join Date
    Aug 2010
    Posts
    18

    can you tell me how can i code in php for showing excel data

    yes i can use PHP fo this fuction but i dont know how to code, i only want that there is an excel file of price lists is located at my server suppose its list.xls, my webpage will automatically shows it data in an aligned form that looks good
    when ever i replace, update or upload a new file with same name list.xls, my webpage will automatically be updated and show the new list from excel.xls

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    Do you have a link to what you have so far?

  6. #6
    Join Date
    Aug 2010
    Posts
    18
    i dont have any thing becasue in need the solution that how it will be done.
    i have a website that are using this feature:
    http://falcon.com.pk/
    click on hot deals
    it will show the excel file data on a webpage. when they need to update the data they simply replace the new excel file with old one and the webpage shows the new excel data.
    can you tell me how it will be possible??

  7. #7
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    I need to see something from your web site. From the response headers I might be able to tell if your server is running under Windows.

  8. #8
    Join Date
    Aug 2010
    Posts
    18
    no the server is based on linux.

  9. #9
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    Then you're going to have to save the Excel as CSV and upload that.

    See http://us2.php.net/manual/en/function.fgetcsv.php for the PHP part. From the given example you should be able to figure it out.

  10. #10
    Join Date
    Aug 2010
    Posts
    18
    i am not getting any thing from there.
    can you find a code for me that will show my excel file data in center of my webpage layout, i mean in frame or something like that,

  11. #11
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,277
    I expect that you will need to save this with a "php" filename extension.
    PHP Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
     "http://www.w3.org/TR/html4/strict.dtd">
    <html lang="en">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <title></title>
      </head>
      <body>
            <div>
    <?php
    $row 
    1;
    if ((
    $handle fopen("test.csv""r")) !== FALSE) {
        while ((
    $data fgetcsv($handle1000",")) !== FALSE) {
            
    $num count($data);
            echo 
    "<p> $num fields in line $row: <br /></p>\n";
            
    $row++;
            for (
    $c=0$c $num$c++) {
                echo 
    $data[$c] . "<br />\n";
            }
        }
        
    fclose($handle);
    }
    ?>
            </div>
      </body>
    </html>

  12. #12
    Join Date
    Aug 2010
    Posts
    18

    Smile yes, good effort but it has a little problem, check the attachment :(

    good effort but it has a little problem, its showing thousand columns and rows even that are null, and in very misaligned form, i tried to fix that, but was unable,
    i am attaching the file having your code and my test.csv file
    please modify the code that will bold the first row of the test.csv and show the data in aligned tabular form and only shows the cells in which i file contains data,
    so as a final product i will get my test.csv data in tabular form in my web-page, please fix it
    it needs your little more effort, thanks
    Attached Files Attached Files

  13. #13
    Join Date
    Feb 2011
    Posts
    1

    Use the Microsoft Excel Web App embed feature

    Microsoft just released a feature with the Excel Web Apps in November 2010 that lets you embed spreadsheets or portions of spreadsheets including charts into a web page. The feature lets viewers sort and filter data and even add their own values to take advantage of your formulas without altering the original document in anyway.

    The advantage of the Web Apps feature is that it's viewable to most popular Web and mobile Web browsers and doesn't require the viewer to have Excel installed. It's also super easy to update the data in Excel.

    All free stuff. You can find out more at http://office.com/embed excel

  14. #14
    Join Date
    Oct 2012
    Posts
    1
    Hi Guys,
    Does anyone know how to perform the same features as in Excel Web Apps but referencing a local source and not a cloud source?

    many thanks
    Phil

  15. #15
    Join Date
    Oct 2012
    Posts
    2
    Hello Friends,

    A few of the data contained in the Excel spreadsheet need to be manually changed before putting the table on the Web, otherwise they would not be understood by visitors. I do not understand what is the easiest method to convert the Excel spreadsheet, change a few data and put the result on a web page as a table. You probably change the data in the excel sheet before converting, then use "Save as" and choose HTML as output format. The resulting HTML file can be directly put on the web server

    Thanks And Regards.
    Agili Ron

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles