I have a software which give me stock data as excel format , the data is automatically update continuously in every second.i have to show these data in web page such like they are shw in excel (ie the web data should be also update in such manner ) and these data. how it is be done.
-
https://github.com/pubnub/real-time-stocks - use PHP to send data to an HTML page which provides real-time Stock exchange data using WebSockets and other protocols. The data is streamed easily from any format. See the included PHP file to get started. – Stephen Blum Jun 10 '13 at 22:51
3 Answers
Programatically export the data into CSV format and import it into a relational database. Extract the data with web language and display in webpage. Tutorials for these steps should all be available.
To convert from xls to csv see the question...
converting an Excel (xls) file to a comma separated (csv) file without the GUI
For the second part, you can have a cron job run a PHP script that reads in the csv file contents and inserts this into a database. Plenty of threads on this also.
To display, select from database and format appropriately, can follow any of the basic tuts on the net for this part.
Post your code if you get stuck :)

- 1
- 1

- 17,563
- 3
- 40
- 62
-
-
thats take a lot of time convert excel to csv and then display to server. i have to do update on server as excel update – Deepa Feb 26 '11 at 07:09
As you've been told, use PHPExcel to read Excel file.
However, refreshing data every second is gonna make a very heavy load on your server.
I'd recommend you rather use server side push using Comet technologies. Take a look at Meteor server.
You will accomplish 'persistent' connection, so server will push data to the client, and the need to refresh the page or create ajax request every second will be gone.

- 5,428
- 28
- 42
You've tagged this PHP, so I assume that's your scripting language of choice: use PHPExcel to read the Excel file and write it out as formatted HTML to your web page. PHPExcel's HTML Writer will retain all the style and formatting of the original Excel workbook.
However, an update every second is pretty extreme for a web page, and for a scripting language. Rather than reading the Excel file whenever the page is requested, run this as a background task converting the Excel to a static HTML file whenever an Excel file is received, and serve the latest static HTML.
If this extreme timing is needed, then you might be better looking at a compiled language, or even a non-web solution.

- 209,507
- 32
- 346
- 385