Похожие чаты

Доброго всем дням. <?php require_once( DIR .'/assets/SimpleExcel/SimpleExcel.php'); require_once DIR . '/assets/Crest/crest.php'; require_once

DIR . '/assets/Crest/settings.php';
use SimpleExcel\SimpleExcel;
use SimpleExcel\Parser;
use SimpleExcel\Parser\IParser;
use SimpleExcel\Parser\BaseParser;
use SimpleExcel\Parser\XLSXParser;

//print_r($_REQUEST);
dumpLog($_REQUEST);
$dealid =$_REQUEST['dealID'];
$arParamsDisk = [
'id' => $_REQUEST['diskId'],
// 'auth' => $_REQUEST['auth']['access_token']
];
dumpLog($arParamsDisk['id']);

$RequestFile = CRest::call('disk.file.get',$arParamsDisk);
dumpLog($RequestFile['result']['DOWNLOAD_URL']);
$inputFileName = trim(file_get_contents($RequestFile['result']['DOWNLOAD_URL']));
//$file_encodings = ['cp1251', 'UTF-8'];
$savePath = DIR . '/tmpFiles/file.xlsx'; // путь для сохранения файла на сервере
file_put_contents($savePath, $inputFileName);

//$encoded_cont = mb_convert_encoding($inputFileName, 'UTF-8', mb_detect_encoding($inputFileName, $file_encodings));
dumpLog($savePath);
$excel = new SimpleExcel('xlsx');
//dumpLog($excel->parser);
//$parser = $excel->constructParser('xlsx');
//dumpLog($parser);
$excel-> parser->loadFile($savePath);
$worksheet = $excel->parser->getWorksheet();
$Rows = $worksheet->getRows();
foreach ($Rows as $row) {
dumpLog($row);
}
$res = unlink($savePath);
dumpLog($res);
dumpLog("Конец");


function dumpLog($data){
echo '<PRE><BR>'.
var_dump($data).
'<BR></PRE>';
}

2 ответов

16 просмотров

И тебе доброго дня! \CUser::FormatName( \CSite::GetNameFormat(), $userData, true, false );

кстати у тебя тут пробел между $excel-> и parser->loadFile($savePath);

Похожие вопросы

Обсуждают сегодня

Типа вызывать GetParent и проверять на соответствие GetModuleHandle?
The Bird of Hermes
67
Do any of you guys have interesting projects one could join? I'm a Middle Full-Stack developer (JS/TS, React & Node)
Lev Shapiro
40
$res = json_decode($наша строка из респонса); $res1 = array_map(fn($o) => $o->name, $res->breadcrumbs[0]->entities); Как такое будет на Хаскеле?.. В начале весь джейсон, в ко...
Хаскель Моисеевич Гопник
25
Hello, I have a question. Can anyone help me? I want to make my cryptocurrencies, like Tron, untraceable by anyone, even government organizations. I was told that to do this,...
 ➛ Eᒪᕼᗩᗰ
14
I read yesterday that in the near future most cryptos will be gone. It's like there is a lot of bullshit within the crypto sphere and this corruption some way is going to be c...
Kanah The Great
30
В чем сила брат, в NASM или FASM?
Isaac Kleiner
18
Вопрос по диагностике ошибок (я знаю в чем, в данном конкретном примере, я знаю, как исправить, пример модельный, понятно, что в реальности бывает намного запутаннее). module...
ⰄⰎⰋⰐⰐⰑⰛⰤⰧⰧⰩⰄ ⰊⰑⰁⰓⰡⰛⰦⰕⰫ
10
Хтось використовував Vapor на Windows?
Jaroshevskii
15
Hi Everybody I bought BCH when it’s 600 and I’m new in crypto what should I do ?
Khush
12
Тут кста кто-нибудь NeoVim использует?
Simple Sorcerer
13
Карта сайта