function export(array $data, $sheet) {
		$groups = array();

		// split full list into separate files
		// reading them back in is a lot faster this way
		foreach ($data as $id => $array) {
			$key = floor($id / 1000000);
			$groups[$key][$id] = $array['name'].'.'.$array['sheet'];
		}

		$ext = $this->encoder->name();
		foreach ($groups as $key => $array) {
			$idx = sprintf("%02x", $key);
			$filename = "{$this->path}/{$sheet}-{$idx}.{$ext}";
			file_put_contents($filename, $this->encoder->encode($array));
		}
	}
function export(array $data, $sheet) {
		$groups = array();

		// split full list into separate files
		// reading them back in is a lot faster this way
		foreach ($data as $id => $array) {
			$key = floor($id / 1000000);
			$groups[$key][$id] = $array['name'].'.'.$array['sheet'];
		}

		$ext = $this->encoder->name();
		foreach ($groups as $key => $array) {
			$idx = sprintf("%02x", $key);
			$filename = "{$this->path}/{$sheet}-{$idx}.{$ext}";
			file_put_contents($filename, $this->encoder->encode($array));
		}
	}
function export ( array $ data , $ sheet ) { $ groups = array ( ) ; // split full list into separate files // reading them back in is a lot faster this way foreach ( $ data as $ id => $ array ) { $ key = floor ( $ id / 1000000 ) ; $ groups [ $ key ] [ $ id ] = $ array [ 'name' ] . '.' . $ array [ 'sheet' ] ; } $ ext = $ this -> encoder -> name ( ) ; foreach ( $ groups as $ key => $ array ) { $ idx = sprintf ( "%02x" , $ key ) ; $ filename = "{$this->path}/{$sheet}-{$idx}.{$ext}" ; file_put_contents ( $ filename , $ this -> encoder -> encode ( $ array ) ) ; } }
Export SheetId collection into separate smaller files

@param array $data
@param $sheet
Export SheetId collection into separate smaller files