Answer the question
In order to leave comments, you need to log in
How to iterate through the names of the columns, and how to refer to the rows of the tabular part by index?
Good afternoon, I continue my adventure in 1C, I ran into a problem, I need to display the names of the columns of the tabular part in Excel, I don’t want to prescribe them with my hands, there are more than 40 of them, and some will be added when finalized. version 1C 8.3, it is desirable to do this on the client for accessing Excel through COM. Well, I would like to do something similar with rows, I need to sort through the rows by index, the column names indicate this is wildness, how can I sort it out?
Answer the question
In order to leave comments, you need to log in
Probably on the client in any way.
If correctly understood - you need to sort out a collection of columns of the table of values.
You will get the table of values from the tabular part on the server:
About = FormAttributeToValue("Object");
ТЗ = About.ТЧ.unload();
Well, then the cycle through the collection of columns of the type
For each TekColumn From TK. Columns Will you understand the cycle
further?
Yes, just like strings. There is no code at hand.
The cycle is done
НомерКолонки= 0;
Пока Истина Цикл
НомерСтроки= 1;
ЗначениеВКолонке= Лист.Cells(НомерСтроки, НомерКолонки).Value ;
Если ПустаяСтрока(ЗначениеВКолонке) Тогда
Прервать;
конецЕсли;
НомерКолонки= НомерКолонки=1;
КонецЦикла;
Unload the TabularPart into a TabularDocument and save it to Excel, it has such a function.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question