result_table->items as $row){
$region = (string)$row->RegionDescriptionUA;
$name = (string)$row->DescriptionUA;
$city = (string)$row->CityDescriptionUA;
$street = (string)$row->StreetDescriptionUA;
$house = (string)$row->House;
$flat = trim((string)$row->Flat);
$lim = $row->Limitweight;
$type = $row->Branchtype;
$code = $row->BranchCode;
$arr_shc = explode (';', str_replace(array('Пн ', ' Ð’Ñ‚ ', ' Ср ', ' Чт ', ' Пт ', ' Сб ', ' Ðд ', '--:-- - --:--'), '', (string)$row->WorkingHours));
$only_r = (string)$row->OnlyReceiver;
$lat = $row->Latitude;
$lon = $row->Longitude;
$adr_more = $row->AddressMoreInformation;
if ($city == ''){
continue;
}
if ($only_r == '1'){
$only_r_txt = '*';
} else {
$only_r_txt = '';
}
$adress = $street;
if ($house != ''){
$adress .= ', ' . $house;
}
if ($flat != ''){
$adress .= '/' . $flat;
}
if ($adr_more != ''){
//$adress .= ' (' . $adr_more . ')';
}
$i++;
if ($last_region != $region){
xlsWriteLabel ($i, 0, iconv('UTF-8', 'windows-1251', $region . ' облаÑÑ‚ÑŒ'));
xlsWriteLabel ($i, 1, '');
xlsWriteLabel ($i, 2, '');
xlsWriteLabel ($i, 3, '');
xlsWriteLabel ($i, 4, '');
xlsWriteLabel ($i, 5, '');
$i++;
}
$last_region = $region;
xlsWriteLabel ($i, 0, iconv('UTF-8', 'windows-1251', $city));
xlsWriteLabel ($i, 1, iconv('UTF-8', 'windows-1251', $type . ' ' . $only_r_txt . ' â„–' . $code));
xlsWriteLabel ($i, 2, iconv('UTF-8', 'windows-1251', $adress));
xlsWriteLabel ($i, 3, iconv('UTF-8', 'windows-1251', $arr_shc[0]));
xlsWriteLabel ($i, 4, iconv('UTF-8', 'windows-1251', $arr_shc[5]));
xlsWriteLabel ($i, 5, iconv('UTF-8', 'windows-1251', $arr_shc[6]));
}
xlsEOF();