damoncf1234
asked on
Importing data from Excel into HTML table for meeting room display
Hello,
We're trying to come up with an HTML page that will be displayed outside of several conference rooms. Currently, we have the meeting name, start, and end times exported to an Excel spreasheet that we use to manually display the meetings in each room (and the file is updated each morning) on a monitor attached to a thin client. I'm thinking the best option would be to create an HTML page that contains a table that pulls it's contents from the existing Excel file that we currently use (which gets updated by an existing script each morning).
In addition to the table displaying the meeting name, start, and end times, there are a few other elements that we'd like to include in the HTML page (from top to bottom):
- Current date and time
- Two lines of static text (location and room name)
- Space for one JPEG photo (one photo would be displayed for about 5 seconds, then scroll to the next in a folder of photos)
- A table, consisting of 3 columns - Meeting Name, Start, End times (table data pulled from Excel file)
- If there are more than 10 meetings, the first 10 entries would be displayed for 10 seconds, then the next 10 meeting entries would be displayed for 10 seconds (and so on; then start back with the first 10 meeting entries, continuing in a loop)
Thank you for any assistance.
Chris
We're trying to come up with an HTML page that will be displayed outside of several conference rooms. Currently, we have the meeting name, start, and end times exported to an Excel spreasheet that we use to manually display the meetings in each room (and the file is updated each morning) on a monitor attached to a thin client. I'm thinking the best option would be to create an HTML page that contains a table that pulls it's contents from the existing Excel file that we currently use (which gets updated by an existing script each morning).
In addition to the table displaying the meeting name, start, and end times, there are a few other elements that we'd like to include in the HTML page (from top to bottom):
- Current date and time
- Two lines of static text (location and room name)
- Space for one JPEG photo (one photo would be displayed for about 5 seconds, then scroll to the next in a folder of photos)
- A table, consisting of 3 columns - Meeting Name, Start, End times (table data pulled from Excel file)
- If there are more than 10 meetings, the first 10 entries would be displayed for 10 seconds, then the next 10 meeting entries would be displayed for 10 seconds (and so on; then start back with the first 10 meeting entries, continuing in a loop)
Thank you for any assistance.
Chris
ASKER
Scott,
Hello - thank you for the response. I forgot to mention, these boards will be running on a network that does not have internet access. We can't use commercial software. So I'm looking down the 'code your own' route as you suggested. Not really able to start this on my own - any further assistance would be appreciated. Thank you.
The room display would be 'just the monitor' - non-touchscreen - so if there's more than say 10 meeting entries, we'd need the table to automatically go to the next 10 entries, pause for about 10 seconds, then go back to the first 10 entries.
Thank you again.
-Chris
Hello - thank you for the response. I forgot to mention, these boards will be running on a network that does not have internet access. We can't use commercial software. So I'm looking down the 'code your own' route as you suggested. Not really able to start this on my own - any further assistance would be appreciated. Thank you.
The room display would be 'just the monitor' - non-touchscreen - so if there's more than say 10 meeting entries, we'd need the table to automatically go to the next 10 entries, pause for about 10 seconds, then go back to the first 10 entries.
Thank you again.
-Chris
>does not have internet access
My answer does not need internet access. Though you would need to run php probably via WAMP/MAMP to do something serverside.
It would probably be easier to just use javascript/jquery though.
> we'd need the table to automatically go to the next 10 entries,
Just use javascript/jquery to cycle through. There are a ton of jquery slide show thingys http://wowslider.com/rq/jquery-slideshow/
My answer does not need internet access. Though you would need to run php probably via WAMP/MAMP to do something serverside.
It would probably be easier to just use javascript/jquery though.
> we'd need the table to automatically go to the next 10 entries,
Just use javascript/jquery to cycle through. There are a ton of jquery slide show thingys http://wowslider.com/rq/jquery-slideshow/
ASKER
Scott,
Thanks for the additional response. Do you have an 'example' that could get me started (a basic HTML page that includes the scrolling picture, and the text pulled from the CSV file?) I haven't done anything with HTML since ~1995...
I just looked at the jquery slideshow, and it looks like a stand-alone application (vs a script). (We can't use 3rd-party applications on this specific network.)
Thank you again.
Chris
Thanks for the additional response. Do you have an 'example' that could get me started (a basic HTML page that includes the scrolling picture, and the text pulled from the CSV file?) I haven't done anything with HTML since ~1995...
I just looked at the jquery slideshow, and it looks like a stand-alone application (vs a script). (We can't use 3rd-party applications on this specific network.)
Thank you again.
Chris
ASKER
Scott,
Hi again. I don't want to seem too helpless -- I took your advice and looked for java-based items... I found a java-based realtime clock:
http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html
and java-based picture slideshow:
http://www.javascriptkit.com/script/script2/jsslide.shtml
So now I'm just looking for help with displaying the CSV spreadsheet data as a table on the HTML page...
(With the ability to automatically 'scroll through two or three 'pages' if there are more than, say 10 meetings/entries in the table, then scroll back to page 1 in a loop.)
Thank you again,
Chris
Hi again. I don't want to seem too helpless -- I took your advice and looked for java-based items... I found a java-based realtime clock:
http://www.webestools.com/scripts_tutorials-code-source-7-display-date-and-time-in-javascript-real-time-clock-javascript-date-time.html
and java-based picture slideshow:
http://www.javascriptkit.com/script/script2/jsslide.shtml
So now I'm just looking for help with displaying the CSV spreadsheet data as a table on the HTML page...
(With the ability to automatically 'scroll through two or three 'pages' if there are more than, say 10 meetings/entries in the table, then scroll back to page 1 in a loop.)
Thank you again,
Chris
For the clock http://flipclockjs.com/ http://hilios.github.io/jQuery.countdown/examples.html
For the csv file, you can't easily directly pull it from the local computer automatically. You can do manual updates and this is a good start http://papaparse.com/#remote-files If you look at that example, they are using a remote address. What you could do is place the csv in localhost and end up with a url like http://localhost/mycsv.csv
You have php in your question tag, but the only way to use php like this would be to either get iis running with php installed on your windows computer or start apache in mac. If you can install MAMP it makes it easier https://www.mamp.info/en/ it it is not your computer than chances are none of these choices will be good and you will have to use javascript.
For the csv file, you can't easily directly pull it from the local computer automatically. You can do manual updates and this is a good start http://papaparse.com/#remote-files If you look at that example, they are using a remote address. What you could do is place the csv in localhost and end up with a url like http://localhost/mycsv.csv
You have php in your question tag, but the only way to use php like this would be to either get iis running with php installed on your windows computer or start apache in mac. If you can install MAMP it makes it easier https://www.mamp.info/en/ it it is not your computer than chances are none of these choices will be good and you will have to use javascript.
ASKER
Scott,
Thanks for the additional suggestions. I think we're good with the real time date/clock, and the rotating photo slideshow.
So that leaves the csv to HTML table. In one of your earlier responses, you mention query and JavaScript for the table/auto-rotating between pages if the table contains more than 10 rows. Can you provide an example of how this would be done?
I found these two items - would either of these work?
http://code.google.com/p/jquerycsvtotable/
stackoverflow.com/question s/14167677 /how-to-fo rmat-csv-t o-html-tab le-rows-an d-columns- using-java script
Thank you again for your help.
Chris
Thanks for the additional suggestions. I think we're good with the real time date/clock, and the rotating photo slideshow.
So that leaves the csv to HTML table. In one of your earlier responses, you mention query and JavaScript for the table/auto-rotating between pages if the table contains more than 10 rows. Can you provide an example of how this would be done?
I found these two items - would either of these work?
http://code.google.com/p/jquerycsvtotable/
stackoverflow.com/question
Thank you again for your help.
Chris
What is wrong with the PapaParse project I pointed you to?
The trick is being able to update your data. With the remote sample, you just need to save your file in the folder where localhost is. The point your remote url to localhost/yourifle.csv https://support.microsoft.com/en-us/kb/972034
What javascript will not be able to do is use c:\somefolder\yourfile.csv as that would be a security risk.
The trick is being able to update your data. With the remote sample, you just need to save your file in the folder where localhost is. The point your remote url to localhost/yourifle.csv https://support.microsoft.com/en-us/kb/972034
What javascript will not be able to do is use c:\somefolder\yourfile.csv
ASKER
Scott,
Hello. Nothing's wrong with it - I'm just trying to figure out 'how' to configure/use it.
Other examples I've found include examples -- "copy this part into the header, and this part into the body where you want something to appear." Is it possible to provide a basic example? There's also the 'page two' part -- if there are more than 10 rows, pause 10 seconds, then automatically scroll to the 2nd page, pause for 10 seconds, then scroll back to the 1st page (back and forth)...
Thank you,
Chris
Hello. Nothing's wrong with it - I'm just trying to figure out 'how' to configure/use it.
Other examples I've found include examples -- "copy this part into the header, and this part into the body where you want something to appear." Is it possible to provide a basic example? There's also the 'page two' part -- if there are more than 10 rows, pause 10 seconds, then automatically scroll to the 2nd page, pause for 10 seconds, then scroll back to the 1st page (back and forth)...
Thank you,
Chris
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Scott,
Sounds good - I'll work on this today. I forgot one other element - roughly every hour, our current solution 'removes' meetings that have already happened (it's 11am; anything ending before 11am is 'dropped' off the display).
Thank you,
Chris
Sounds good - I'll work on this today. I forgot one other element - roughly every hour, our current solution 'removes' meetings that have already happened (it's 11am; anything ending before 11am is 'dropped' off the display).
Thank you,
Chris
ASKER
Scott,
Hello again - I've been working on this for most of the day -- for some reason, part one of your solution doesn't work. If I go to the JSBin.com link you provided, it works fine in there. But if I copy and save the code into notepad, save as xxx.html, it only displays 'col1, col2, col3' -- with a name of Scott.
It seems to take a while to load, then displays the column headers - col1, col2, col3 -- I've left the window open for several hours, but none of the fields/data appear. This is without changing anything/leaving everything the way it appears/works in JSBin.com - which makes no sense... :)
I've scoured around the internet, looking for a 'start to finish' example of using PapaParse -- what should be in the header, what should be in the body where you want it to display a table, what should be saved separately as a .js file, etc. There are a billion snippets of code describing PapaParse - but none are 'complete.'
One helpful site that has 'the full examples' I like is javascriptkit.com -- it shows exactly what to put into the header, what to put into the body, and what to save as a .js file. The last time I've done any type of HTML/web stuff is probably back in 1995. I'm working on this current project because my work needs a replacement for an existing system that is not supported in Win7 or 10...
Anyway, the rest of the stand-alone HTML page is functioning well - real-time clock, scrolling photos, etc. The last thing we need to get working is this CSV to HTML table (w/ 10-second page 'scroll', update).
I've tried running the code you pasted above, and on JSBin.com -- on Firefox and Chrome -- with the same results - the header (col1, col2, col3) appear, but none of the test csv text. I'll open just the CSV to HTML table issue in a new question if you'd like.
Thank you again for your help.
Chris
Hello again - I've been working on this for most of the day -- for some reason, part one of your solution doesn't work. If I go to the JSBin.com link you provided, it works fine in there. But if I copy and save the code into notepad, save as xxx.html, it only displays 'col1, col2, col3' -- with a name of Scott.
It seems to take a while to load, then displays the column headers - col1, col2, col3 -- I've left the window open for several hours, but none of the fields/data appear. This is without changing anything/leaving everything the way it appears/works in JSBin.com - which makes no sense... :)
I've scoured around the internet, looking for a 'start to finish' example of using PapaParse -- what should be in the header, what should be in the body where you want it to display a table, what should be saved separately as a .js file, etc. There are a billion snippets of code describing PapaParse - but none are 'complete.'
One helpful site that has 'the full examples' I like is javascriptkit.com -- it shows exactly what to put into the header, what to put into the body, and what to save as a .js file. The last time I've done any type of HTML/web stuff is probably back in 1995. I'm working on this current project because my work needs a replacement for an existing system that is not supported in Win7 or 10...
Anyway, the rest of the stand-alone HTML page is functioning well - real-time clock, scrolling photos, etc. The last thing we need to get working is this CSV to HTML table (w/ 10-second page 'scroll', update).
I've tried running the code you pasted above, and on JSBin.com -- on Firefox and Chrome -- with the same results - the header (col1, col2, col3) appear, but none of the test csv text. I'll open just the CSV to HTML table issue in a new question if you'd like.
Thank you again for your help.
Chris
If you copied exactly it will not work. Copy the cover file to the same folder as the home file. Make sure to adjust the Ajax Urlacher to just the file name.
Url not urlacher. .. auto correct
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Scott,
Excellent, thank you for the update. I followed your instructions and changed line 9 to "schedule.csv"
It still didn't show the data from schedule.csv (just the headers) -- so I went into "developer tools" in Chrome, and found "failed to load resource:net::ERR_FILE_NOT _FOUND file://code.jquery.com/jqu ery-1.11.1 .min.js" -- after looking at that for a minute, I saved the jquery-1.11.1.min.js file from http://code.jquery.com to the same folder on my local machine, then changed line 4 to <script src="file://g:/test/IDS/jq uery-1.11. 1.min.js"> </script>
Now, it works in IE -- shows the headers, plus the data in schedule.csv.
Doesn't work in Chrome (got some Cross Origin Requests only support http......" message in the developer tool window. But if it works in IE, that should be good. I found this https://code.google.com/p/locallinks/ that might fix that issue in Chrome, but haven't tried it yet. Just glad it's working in IE.
I'm working on the 'look' of the table now, so it matches our current setup...
Also looking at the "10 rows at a time/scroll" issue... How would I add the same numbered class to the first 10 rows, then increase the class by 1, and continue numbering the rows? I found something that increments by 1 until 6, then restarts at 1 -- but I need to mark the first 10 items as numbered class 1, then start over at 2, for the next 10 items.
https://css-tricks.com/forums/topic/addclass-1-to-6-then-repeat-after-six-list-items-jquery/
http://jsfiddle.net/Mottie/Y65hS/
Thank you for your help. I can ask this (item #4) in a new question if you'd prefer.
-Chris
Excellent, thank you for the update. I followed your instructions and changed line 9 to "schedule.csv"
It still didn't show the data from schedule.csv (just the headers) -- so I went into "developer tools" in Chrome, and found "failed to load resource:net::ERR_FILE_NOT
Now, it works in IE -- shows the headers, plus the data in schedule.csv.
Doesn't work in Chrome (got some Cross Origin Requests only support http......" message in the developer tool window. But if it works in IE, that should be good. I found this https://code.google.com/p/locallinks/ that might fix that issue in Chrome, but haven't tried it yet. Just glad it's working in IE.
I'm working on the 'look' of the table now, so it matches our current setup...
Also looking at the "10 rows at a time/scroll" issue... How would I add the same numbered class to the first 10 rows, then increase the class by 1, and continue numbering the rows? I found something that increments by 1 until 6, then restarts at 1 -- but I need to mark the first 10 items as numbered class 1, then start over at 2, for the next 10 items.
https://css-tricks.com/forums/topic/addclass-1-to-6-then-repeat-after-six-list-items-jquery/
http://jsfiddle.net/Mottie/Y65hS/
Thank you for your help. I can ask this (item #4) in a new question if you'd prefer.
-Chris
>,then changed line 4 to <script src="file://g:/test/IDS/jq uery-1.11. 1.min.js"> </script>
You didn't follow my instructions. Please read again.
<script src="myfile.js"></scipt> where myfile.js is in the same folder as the rest of the files.
Any other errors you have, post that to a new question after you close this out. Get the basic page working first.
You didn't follow my instructions. Please read again.
<script src="myfile.js"></scipt> where myfile.js is in the same folder as the rest of the files.
Any other errors you have, post that to a new question after you close this out. Get the basic page working first.
ASKER
Scott,
Ok, thank you for your help. The page is functioning in IE, and the CSV file is appearing as an HTML table. I'm trying to apply a style to the entire table using STYLE-TYPE in the head then TABLE CLASS in the body, which isn't working yet... I'll post another question for styling the table if I can't figure it out, along with another question for adding the first 10 rows to the same numbered class as you suggested.
Thanks again.
Chris
Ok, thank you for your help. The page is functioning in IE, and the CSV file is appearing as an HTML table. I'm trying to apply a style to the entire table using STYLE-TYPE in the head then TABLE CLASS in the body, which isn't working yet... I'll post another question for styling the table if I can't figure it out, along with another question for adding the first 10 rows to the same numbered class as you suggested.
Thanks again.
Chris
ASKER
Scott was very responsive. Thank you.
Otherwise, your choices are to connect to excel as you would a database, http://php.net/manual/en/function.odbc-connect.php or keep the excel data in nice neat columns and save as a csv http://php.net/manual/en/function.fgetcsv.php or just do it all client side in js http://papaparse.com/.
Are you able to start this on your own? Would it be easier to just use digital sign software? http://www.digitalsignage.com/
If you go the code your own route, I would start with one of the bootstrap examples and modify to your needs http://jsbin.com/kejeledovu/1/edit
Open in new window