I would like to ask how I can upload one excel workbook with multiple worksheets into a database. How can I read the 5 worksheet's names, which are office table, office chairs, aircon, electric fan, and filling cabinet.
They also have a different format. I only upload the asset number, asset description, no of unit, and location to the database .
Here is my current code:
$file1 = $this->data['Data']['file']['tmp_name'];
$file = fopen($file1, "r");
while (($emapData = fgetcsv($file, 10000, ",")) !== FALSE)
{
var_dump($emapData);
exit;
}
fclose($file);