Rebel_no_1
asked on
How do I load and display a (local) csv file's contents in a table in an .HTA (HTML) (Working Simulation attached)
I am busy building an .HTA interface (frontend) that will replace the explorer shell. (I have built this with the help of some great E-Exchange individuals!!!)
This .HTA will need to be able to read a local DB.csv file and display the contained values in a table format. I have bult a background and prefer to let all the graphics live there for now. Therefore the "table" should only be values without borders or background color (if possible). I would prefer if the table can be moved on the page with the use of X and Y coordinates as I will have to be able to modify this quickly for different demo's and projects. (Currently everything that is displayed by the .hta can be moved with x,y coordinates in the corresponding span which works great!)
I have attached the latest working script where this new "data element" must be inserted in. I have also attached the image, .csv and .background files. I have simulated the required table element with red text to help convey the idea as clearly as possible.
Instructions:
Please note that the DB.csv file will be updated with new values by another script. This other script will query the DB every few minutes and overwrite the old values. This means that the .hta should preferably also update the displayed values to the screen as they change. (Currently the whole screen refreshes every 1000ms as per my understanding)
Demo.zip
This .HTA will need to be able to read a local DB.csv file and display the contained values in a table format. I have bult a background and prefer to let all the graphics live there for now. Therefore the "table" should only be values without borders or background color (if possible). I would prefer if the table can be moved on the page with the use of X and Y coordinates as I will have to be able to modify this quickly for different demo's and projects. (Currently everything that is displayed by the .hta can be moved with x,y coordinates in the corresponding span which works great!)
I have attached the latest working script where this new "data element" must be inserted in. I have also attached the image, .csv and .background files. I have simulated the required table element with red text to help convey the idea as clearly as possible.
Instructions:
1. Download and unzip Demo.zip contents into a folder.
2. Rename Screen.txt to Screen.hta.
3. Run the Screen.hta
Please note that the DB.csv file will be updated with new values by another script. This other script will query the DB every few minutes and overwrite the old values. This means that the .hta should preferably also update the displayed values to the screen as they change. (Currently the whole screen refreshes every 1000ms as per my understanding)
Demo.zip
So, will the number of rows and columns in the table and the CSV always be exactly equal?
~bp
~bp
ASKER
Yes, the script will always populate the information 100% as per the example. If no people was registered yesterday the values for male, female and yesterday total, will be "0".
Therefore the following ,.csv table will always be filled with values:
A,B,C
D,E,F
G,H,I
I hope I'm explaining ok? Hope this makes sense Bill.
Therefore the following ,.csv table will always be filled with values:
A,B,C
D,E,F
G,H,I
I hope I'm explaining ok? Hope this makes sense Bill.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have fixed a minor issue with the tags and I am still busy formatting and sizing the table but this is PERFECT! It's great that everything is movable and sizable. Thank you so much for your time Bill.
ASKER
This information table is perfect for displaying information from a .csv file containing three rows and three columns.
Great, glad that was useful.
~bp
~bp
ASKER