You can also do this with PHPExcel. Please find the code below which works fine to me. The code below does not contain a file browser and PHPExcel.php This can be automated to your system by making loop with reading number of files in a folder <?php /* Author: Rajan Maharjan Website: […]
के हो के होइन ?
कविले कविता कोर्छ, कथा होईन साथीले समबन्द सिकाउछ, शत्रुता होईन हिमालले हासन हिम्मत दिन्छ, हावाबाट हल्चल होईन
FUN with SON under the SUN
Some folks might RUN, while some might have FUN when they are under the toasty SUN. But I like to soap my baby SON under the SUN as it gives me utmost FUN. I enjoy watching him playing in the water that is what I feel Fun_IN_Sun
Bulk update/modify email signature using powershell
$import= import-csv -Path ‘\email-list.csv’ #location of CSV file $import | ForEach-Object { }
Import xls data to MYSQL
mysql_connect(“localhost”,”root”,””) or die(“cannot connect”); mysql_select_db(“db_name”) or die(“cannot find database”); $dataSheetFile=”sample_csv.csv”; $counter=0; if (($handle = fopen($dataSheetFile, “r”)) !== FALSE) { while (($data = fgetcsv($handle, 1000, “,”)) !== FALSE) { $university=htmlentities(trim($data[0])); $faculty=htmlentities(trim($data[1])); $research_sub_group=htmlentities(trim($data[2])); $themenband=htmlentities(trim($data[3])); $street=htmlentities(trim($data[4])); $zipcode=htmlentities(trim($data[5])); $city=htmlentities(trim($data[6])); $website=htmlentities(trim($data[7])); $counter++; mysql_query(“INSERT INTO research_sub_group set university=’$university’, faculty=’$faculty’, research_sub_group=’$research_sub_group’, themenband=’$themenband’, street=’$street’, zip=’$zipcode’,city=’$city’,website=’$website'”); } } echo […]
Open CSV File using PHP
// place this code inside a php file and call it f.e. “download.php” $_GET[‘download_file’]=’websiteData.csv’; $path = $_SERVER[‘DOCUMENT_ROOT’].”/wedev/”; // change the path to fit your websites document structure $fullPath = $path.$_GET[‘download_file’]; if ($fd = fopen ($fullPath, “r”)) { $fsize = filesize($fullPath); $path_parts = pathinfo($fullPath); $ext = strtolower($path_parts[“extension”]); switch ($ext) { case […]