Имя: Пароль:
1C
1С v8
1C и Ексель удаление пустой строки
0 Eeelena
 
16.01.17
11:44
Здравствуйте, подскажите, пожалуйста если какая то процедура проверки на пустую строку в ексель из 1С?
1 vicof
 
16.01.17
11:45
Есть
2 Eeelena
 
16.01.17
11:50
(1) какая?)
3 vicof
 
16.01.17
12:03
Строка(Ячейкаэксель) = ""
4 Eeelena
 
16.01.17
12:06
(3) нет, мне нужно не ячейку проверить, а разом всю строку на пустоту
5 vicof
 
16.01.17
12:08
(4) Строка состоит из ячеек. Ваш кэп.
6 Eeelena
 
16.01.17
12:08
(3) у меня почему то не хочет находить последнюю строку в файле, делаю так Функция НомерПоследнейЗаполненнойСтрокиЛиста(ФайлExcel)
    Результат =
    ФайлExcel.ActiveSheet.UsedRange.Row +
    ФайлExcel.ActiveSheet.UsedRange.Rows.Count - 1;
    
    Если Не ЗначениеЗаполнено(Результат) Тогда
        Результат = 1;
    КонецЕсли;
    
    Возврат Результат;
    
КонецФункции

но он все равно выдает мне пустые строки
7 Eeelena
 
16.01.17
12:09
(5)мне ж нужно всю строку по ячейкам проверять? нельзя никак сразу всю строку проверить?
8 YFedor
 
16.01.17
12:11
(7) я думаю нельзя, но циклы еще никто не отменял
9 vicof
 
16.01.17
12:12
(7) Пустая строка - это когда все ячейки пустые.
10 mehfk
 
16.01.17
12:14
(0) IsEmpty Function
      

Returns a Boolean value indicating whether a variable has been initialized.

Syntax

IsEmpty(expression)

The required expression argument is a Variant containing a numeric or string expression. However, because IsEmpty is used to determine if individual variables are initialized, the expression argument is most often a single variable name.

Remarks

IsEmpty returns True if the variable is uninitialized, or is explicitly set to Empty; otherwise, it returns False. False is always returned if expression contains more than one variable. IsEmpty only returns meaningful information for variants.
11 mehfk
 
16.01.17
12:15
Returns a Range object that represents a cell or a range of cells.

expression.Range(Cell1, Cell2)
expression    Required. An expression that returns one of the above objects.

Cell1   Required Variant. The name of the range. This must be an A1-style reference in the language of the macro. It can include the range operator (a colon), the intersection operator (a space), or the union operator (a comma). It can also include dollar signs, but they’re ignored. You can use a local defined name in any part of the range. If you use a name, the name is assumed to be in the language of the macro.

Cell2   Optional Variant. The cell in the upper-left and lower-right corner of the range. Can be a Range object that contains a single cell, an entire column, or entire row, or it can be a string that names a single cell in the language of the macro.

Remarks
When used without an object qualifier, this property is a shortcut for ActiveSheet.Range (it returns a range from the active sheet; if the active sheet isn’t a worksheet, the property fails).

When applied to a Range object, the property is relative to the Range object. For example, if the selection is cell C3, then Selection.Range("B1") returns cell D3 because it’s relative to the Range object returned by the Selection property. On the other hand, the code ActiveSheet.Range("B1") always returns cell B1.
12 Megas
 
16.01.17
13:17
А ещё Эксель можно читать запросом с условиями =)