sanfly Posted May 29, 2007 Share Posted May 29, 2007 Hi Guys i have an excel file I want to read into a database. I found a tutorial which says to save the file into a xml file, then it basically gets all the data out, and puts it into an array The code seems to be falling over at this line so far: if ( $_FILES['file']['tmp_name'] ){ $dom = DOMDocument::load( $_FILES['file']['tmp_name'] ); $rows = $dom->getElementsByTagName( 'Row' ); ..... and gives this error: Undefined class name 'domdocument' in /home/myhost/public_html/import.php Ive also tried this if ( $_FILES['file']['tmp_name'] ){ $dom = new DOMDocument(); $dom->load($_FILES['file']['tmp_name']); $rows = $dom->getElementsByTagName( 'Row' ); ..... which gives this error: Cannot instantiate non-existent class: domdocument in /home/myhost/public_html/import.php Any ideas? Link to comment https://forums.phpfreaks.com/topic/53337-importing-excel-into-a-mysql-database/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.