0 Replies - 245 Views - Last Post: 22 March 2013 - 08:46 AM Rate Topic: -----

#1 BarNunBoi  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 232
  • Joined: 28-March 12

PHPEXCELREADER Sheet doesn't save

Posted 22 March 2013 - 08:46 AM

I am trying to save a workbook to my database via a upload system. I can get all my sheets to save in my workbook except for one. When I upload the workbook it parses with no problem. I don't get any errors. Its just that the last sheet will not save for me. Im not sure as to why its not saving. Here is my code for that particular sheet


// Get Endorsments
		$ret['Endorsement'] = array();
		$endorsementRows = $s[6];
		$i = 12; 
		$continue = true;
		while($continue) {
			if(!empty($endorsementRows[$i][1])) {
				$ret['Endorsement'][] = array(
					'policy_number' => $endorsementRows[$i][1],
					'endorsement_number' => $endorsementRows[$i][2],
					'effective_date' => $this->Date->formatDate($endorsementRows[$i][3]),
					'endorsement_effective_date' => $this->Date->formatDate($endorsementRows[$i][4]),
					'end_date' => $this->Date->formatDate($endorsementRows[$i][5]),
					'premium' => $this->Money->formatPrice($endorsementRows[$i][6]),
					'premium_limit' => $this->Money->formatPrice($endorsementRows[$i][7]),
					'producing_id' => $this->State->stateStrToId($endorsementRows[$i][8]),
					'filing_id' => $this->State->stateStrToId($endorsementRows[$i][9]),
					'policy_id' => '',
					'coverage_id' => ''
				);
			} else {
				$continue = false;
			}
			$i++;
		}


Now I have tried to change ret[Endorsement] to ret[endorsements] and it didn't work. Also I have checked my validation rules in my model. (Note: I am running Cakephp 1.3) Everything seems fine to my knowledge. Also I checked my relationships and its seems ok. What else could cause the sheet/model not to save? Thanks for taking the time to view my post and for any input you give!!

Is This A Good Question/Topic? 0
  • +

Page 1 of 1