Category : phpexcel-1.8.0

public function import_excel(){ if (!$_FILES["file"]["name"]) { echo "Please upload excel file !"; } else { $path = $_FILES["file"]["tmp_name"]; $object = PHPExcel_IOFactory::load($path); foreach ($object->getWorksheetIterator() as $worksheet) { $highestRow = $worksheet->getHighestRow(); $highestColumn = $worksheet->getHighestColumn(); for ($row = 2; $row <= $highestRow; $row++) { $group = $worksheet->getCellByColumnAndRow(0, $row)->getValue(); $merchant_id = $worksheet->getCellByColumnAndRow(1, $row)->getValue(); $login_id = $worksheet->getCellByColumnAndRow(2, $row)->getValue(); $play_id = ..

Read more

Trying to Insert Records from an Excel into Database. I am running this code and the file is getting saved in the destination folder but the records are not storing into the db table. <?php // PHPExcel-1.8.0 require ‘../Php/PHPOffice/PHPExcel/Classes/PHPExcel/IOFactory.php’; date_default_timezone_set("Asia/Kolkata"); // Database Connection $connect = mysqli_connect("localhost", "root", "", "tools_bta"); $confirm_db = mysqli_connect("localhost", "root", "", "confirmation"); ..

Read more

Severity: 8192 Message: Array and string offset access syntax with curly braces is deprecated Filename: Shared/String.php Line Number: 526 File: C:XAMPPhtdocsklinikapplicationcontrollersobat.php public function print_excel() { $data[‘obat’] = $this->m_obat->tampil_data(‘tb_obat’)->result(); require(APPPATH. ‘Excel/Classes/PHPExcel.php’); require(APPPATH. ‘Excel/Classes/PHPExcel/Writer/Excel2007.php’); $object = new PHPExcel(); $object->getProperties()->setCreator("Klinik Zahra"); $object->getProperties()->setLastModifiedBy("Klinik Zahra"); $object->getProperties()->setTitle("Daftar Stock Obat"); $object->setActiveSheetIndex(0); $object->getActiveSheet()->setCellValue(‘A1’, ‘Nomor’); $object->getActiveSheet()->setCellValue(‘B1’, ‘Nama Obat’); $object->getActiveSheet()->setCellValue(‘C1’, ‘Jenis Obat’); $object->getActiveSheet()->setCellValue(‘D1’, ‘Harga Beli’); ..

Read more

‘ActiveCell.FormulaR1C1 =_ "=IF(AND((‘PreprosedforAverage Zoo dataset’!R4C1=’PreprosedforAverage Zoo dataset’!R4C4),’PreprosedforAverage Zoo dataset’!R4C3),1,0)" I want to be able to change Row number and Column number in a doubly nested for loop like R[i]C[j] where variables ‘i’ and ‘j’ are integers. Can you help please… Thanks in advance Sourc..

Read more