javascript - Read data from an excel CSV to an html page and search -
how load data csv file html/php page?
.
the csv file contains data such 'username','emailid','phone number'. these 3 parameters in each row, should loaded html/php page. also, need write 'username','emailid','phone number' excel sheet. can done?(csv html page loaded).
and, need search each elements, in row-wise.
convert excel sheet csv file , can this
$handle = fopen("yourexcel.csv",'r'); if(!$handle) die('cannot open uploaded file.'); //read file csv while (($data = fgetcsv($handle, 1000, ",")) !== false) { $username = $data['0']; $email = $data['1']; $phonenumber = $data['2']; here data[0],data[1] columns of excel sheet if(strlen($username ) || strlen($email) || strlen($phonenumber)){ $query2 = "insert user_master(username,email,phonenumber) values ('".$username."','".$email."','".$phonenumber."');"; mysql_query($query2); }
then can retreive data db , dipplay in project ever needed
Comments
Post a Comment