C
C
countZer02020-04-20 10:01:39
1C-Bitrix
countZer0, 2020-04-20 10:01:39

How to get ID values ​​and write line by line to .xls?

Hello !

I form an array like:

Array
(
    [0] => Array
        (
            [NAME] => Иванов
            [LAST_NAME] => Иван
            [UF_SELECT_MON] => Array
                (
                    [0] => 1362
                )

            [UF_SELECT_TUE] => Array
                (
                    [0] => 1362
                    [1] => 1363
                )

            [UF_SELECT_WED] => Array
                (
                    [0] => 1362
                    [1] => 1363
                )

            [UF_SELECT_THU] => Array
                (
                    [0] => 1362
                    [1] => 1363
                )

            [UF_SELECT_FRI] => Array
                (
                    [0] => 1362
                )

            [UF_SELECT_SAT] => Array
                (
                    [0] => 1362
                )

            [UF_SELECT_SUN] => Array
                (
                    [0] => 1362
                    [1] => 1363
                )

            [UF_ADDRESS] => 1374
        )

    [1] => Array
...


UF_SELECT_MON, UF_SELECT_THU... store element IDs in the infoblock. You need to get the names of the elements and how to write it to an EXCEL file, by type:
User | Day of the week | Dish
adm | Monday | <list of items here>

Any help would be welcome.

Thank you !

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-04-20
@AlexeyCaTHaR

An array is formed in CIBlockElement::GetList ???
If yes, then there you can make a selection by related elements. In the sample array:

PROPERTY_WHATEVER.NAME

You can write to csv using fputcsv.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question