08-05-2002, 11:54 PM
I have been having some trouble getting the data from MS Excel into an HTML page. I am trying to get the exact data from a specific cell in a specific sheet from a specific book within MS Excel (XP Edition).
Can someone please give me some guidance towards this and how to go about it.... I know it can be done, just not sure how!
Many thanks :thumbsup:
don't know. are you sure it can be done ? do you know a site where they use this ? i've never came across something like that.
(excell isn't an sql-database so, how would you query it)
in every case, if you want to use (select, insert, update, delete) data in a web-application, excell isn't a good format to store qour data in. you can always import the sheets into access and from their on, it's a widespread practice.
anyone else ?
08-25-2002, 11:38 AM
Ill give you the run down. I am currently using a program which gets written to in real time by a Unix box. This basically transfers binaries into data then it writes to excel reports every 3 minutes and updates them etc. Seeing as i cannot get the binaries into HTML, i am trying to get the Excel formats into HTML in the shortest and less power zapping way (ie, not via Access etc)... so I have since come accross the feature in Office 2000 which enables you to write to web pages and then update them when you save the pages... this is about as close to dynamic content from Ecxel as i can get... I know excel is not the most ideal format, but its all i have to work with at the moment...
so now youy know the story, is there any way from doing it apart from the way I am?? ( i am "ok" with UNIX, but no where NEAR good enough to be able to pull the binaries off, decode them, then write to HTML! I WISH i was!)
well, about 325 people read this trhead and none of them came up with a solution. you've said it can be done buth i'm not convinced.
in the excell helpfunction theirs a bunch of items dealing with getting data from the web, buth none about the other way around (unless about publishing dynamically updated workbooks and worksheets, buth that's not what you want)
i assume you'll have to:
- create a macro (in Visual Basic) that periodically updates your excel-file + computes/selects the values you want (and maybe stores them in a temporarely table)+ exports them (the table) to a .csv or xml-file
- create a server sided scripting file (an asp or something) that reads the .csv or xml and creates an aray with that data in + creates an html-file with the data from the array in.
i never tried it, buth i think this is the quickes way to do it
09-14-2002, 10:21 AM
I have since been able to do it....
I have created another sheet and designed it the way I want the page to appear, then related all that data back to the original, un-editable sheets. I have written a Macro which sits on the new sheet and tells it to auto save every 3 mins.
In the initial set up of the sheet I told it to piblish as a Web Page (office 2000 and up feature) and then update the page each time the worksheet is saved. Then in my base web page (the excel sheet is an insert), I have written a script which tells it to refresh the HTML page every 3 mins as well....
This works the way I want it, and also it does not require any server side programs either - think outside the box people ;)
09-14-2002, 10:27 AM
What you are referring to is a datasheet which is a feature of MS Excel 2000+. It will only work in IE though.
As for a comment earlier about Excel not being a database. Well actually an excell spreadsheet is set up in a very similar fashion and can actually be used as a data source but not in the same way as a normal database. Excel interacts with other MS Office programs and can be used as a datasource for those program in the same way that MS Access is used. You can run queries and such.
i see you only followed me on the first steps. well, you call the shots buth :
- spookster is right : only works with IE
- doesn't allow 'selective' showing of data
- doesn't allow nice 'packaging'
- doen't allow interactivity
really : export the sheet to a xml or csv file and use sql to show the data.
i commented that excell isn't an sql-database. (meaning you can't use sql and the rdbms to manipulate the data, to create views etc, since the rdbms only operates on relational databases)
are you now saying it can be done ? please tell us how ?
(i know you can use the odbc to import files in excel-format, buth that's not what i mean by querying)
09-18-2002, 11:44 AM
The challange is in the fact that I CANNOT use another source - I can only use Excel... no databases, no other programs... The fact that I will only run in IE doesnt worry me, because it is sitting on an Intranet anyhoo.... so yeh. There is no point in getting into xml or rdbms or anything like that....
09-18-2002, 02:56 PM
I have done this... long time ago....
With ASP... using an ODBC driver for MS Excell... And spreadsheet columns were named...
It worked, but very, very slow...
Have not tried this, but if You only read these sheets it will be better to convert them to CSV format and use CSV's instead...
09-18-2002, 10:39 PM
Thats what I like to hear, Alekz. Using initiative!
Can you please send me an email outlining how you did it? That would be superb my friend!
Thanks a million!
09-19-2002, 08:02 AM
I'll probably not find this in my archives, but here's a technical article regarding Your problem:
HOWTO: Query and Update Excel Data Using ADO From ASP