• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upload excel

#1
[eluser]Unknown[/eluser]
any ane can help me,
i need sample class to upload excel into mysql

#2
[eluser]Rick Jolly[/eluser]
Excel could be saved as a CSV. If that works for you then you could use:
Code:
$fp = fopen($complete_path_to_the_uploaded_csv_file, "r")
while (($line = fgetcsv($fp, 1000, ",")) !== false)
{
   // $line is an array of cells for the current line in the file
  
   // do something
}

There are other examples here:
http://ca3.php.net/fgetcsv

#3
[eluser]Christopher Blankenship[/eluser]
Are you sure you need to upload the excel file into the database (thats at least the way I read this post) or upload the file on the server and pass the database the name of the file and location for retrieval. The latter will be better all around.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.