Is there a way to get data from an Excel spreadsheet into a post, the way you would copy and paste the cells in Dreamweaver and it creates a table?
Thank you.
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 30, 2010 6:26pm
Subscribe [3]#1 / Aug 30, 2010 6:26pm
Is there a way to get data from an Excel spreadsheet into a post, the way you would copy and paste the cells in Dreamweaver and it creates a table?
Thank you.
#2 / Aug 30, 2010 9:03pm
If I were asked to build something like this here is how I would go about it:
1) I would do some research / experimenting to learn the exact format of the data stored in the clipboard when you copy from Microsoft Excel (be sure to test different versions of Excel).
2) I would build a custom field type that would be added to channels in order to accept this pasted data. The base of it might be a textarea, or it might be a div, depending on what you discover is the easiest to work with for your needs.
3) I would use Javascript to capture and parse the data being pasted to the custom field. How exactly you do this would depend heavily on the exact format of the Excel data coming in. One solution might be to grab all the data and try to map it to an HTML table (like your Dreamweaver example).
#3 / Aug 30, 2010 9:07pm
There might also be an add-on that already does something like this, or that you could possibly use as a base for your own work (granted the license allows it).
http://devot-ee.com/search/results/search&keywords=excel&channel=addons/
#4 / Aug 31, 2010 10:39am
Thanks, Chuck. I’m sure this will be a big help!
#5 / Aug 31, 2010 11:06am
No problem, good luck!
#6 / Aug 31, 2010 4:47pm
Thanks for the assist, Chuck! This is more of a question for the CodeShare Corner so I’ll just move this thread there. Thanks.