Read data from Excel and store in MySQL database using PHP
This is continuation of my previous video https://www.youtube.com/watch?v=LWXEsVFbED4. In this video I have shown how you can import data from excel file and insert into a table in MySQL database….
Read more »Read any Excel File using PHPExcel in PHP
In this video I have shown how to read any excel file using PHPExcel in PHP. Kindly download the library Classes.zip here. 1. Project Structure. 2.index.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<html> <body> <center> <h2>Read Excel By PHPExcel</h2> <?php require_once "Classes/PHPExcel.php"; $path="test1.xlsx"; $reader= PHPExcel_IOFactory::createReaderForFile($path); $excel_Obj = $reader->load($path); //Get the last sheet in excel //$worksheet=$excel_Obj->getActiveSheet(); //Get the first sheet in excel $worksheet=$excel_Obj->getSheet('0'); echo $worksheet->getCell('E33')->getValue(); $lastRow = $worksheet->getHighestRow(); $colomncount = $worksheet->getHighestDataColumn(); $colomncount_number=PHPExcel_Cell::columnIndexFromString($colomncount); echo $lastRow.' '; echo $colomncount; echo "<table border='1'>"; for($row=0;$row<=$lastRow;$row++){ echo "<tr>"; for($col=0;$col<=$colomncount_number;$col++){ echo "<td>"; echo $worksheet->getCell(PHPExcel_Cell::stringFromColumnIndex($col).$row)->getValue(); echo "</td>"; } echo "</tr>"; } echo "</table>"; ?> </center> </body> </html> |
The above code…
Read more »JAVA JSP upload image and show it in JSP page
This project is continuation of my previous video JAVA JSP file upload example In this video I have shown how you can host a project in tomcat server. Then you…
Read more »java.lang.ClassNotFoundException: org.postgresql.Driver [solved]
1. In this video I have shown how you can solve the error.
1 2 3 4 5 6 7 8 9 |
java.lang.ClassNotFoundException: org.postgresql.Driver at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.jinujawad.com.ConnectDB.get_connection(ConnectDB.java:23) at com.jinujawad.com.ConnectDB.main(ConnectDB.java:10) |
2. This error came for me on running the below java program in Eclipse IDE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
package com.jinujawad.com; import java.sql.Connection; import java.sql.DriverManager; public class ConnectDB { public static void main(String[] args) { ConnectDB obj_ConnectDB=new ConnectDB(); obj_ConnectDB.get_connection(); } public Connection get_connection() { Connection connection = null; String host="localhost"; String port="5432"; String db_name="jinujawad"; String username="postgres"; String password="root"; try { Class.forName("org.postgresql.Driver"); connection = DriverManager.getConnection("jdbc:postgresql://"+host+":"+port+"/"+db_name+"", ""+username+"", ""+password+""); if (connection != null) { System.out.println("Connection OK"); } else { System.out.println("Connection Failed"); } } catch (Exception e) { e.printStackTrace(); } return connection; } } |
…
Read more »How to take back up of PostgreSQL Database – Windows PC using CMD
In this video I have shown how to take back up of PostgreSQL database in windows PC using Command Prompt. This is demonstrated in windows 10 pc. 1. Open the…
Read more »How to Auto back up PostgreSQL Database
In this video I have shown how to create Auto Back up for PostgreSQL Database. This method is demonstrated in Windows 10 PC using task scheduler. 1. First create batch…
Read more »How to connect to PostgreSQL using JAVA JDBC
In this video I have shown how you can connect to PostgreSQL using JAVA JDBC. This example is shown in eclipse IDE. You should download the jar file from official…
Read more »How to create a zip file using PHP
In this video I have shown how you can create a zip format of any file using PHP code. This example is shown in XAMPP server installed in windows 10…
Read more »Change Computer IP address using JAVA
In this video I have shown how you can change IP address using java project. I have shown this using Eclipse IDE. 1. Project Structure in Eclipse IDE is shown…
Read more »JAVA Extract text from PDF using PDFBox library OCR Optical Character Recognition
In this video I have shown how you can extract text from PDF using java. All the dependencies and project source code is below. 1. Project Structure in Eclipse IDE….
Read more »