v8: Как из 1С удалить столбцы или колонки в Excel? #222050


#0 by olchik
#1 by olchik
Подскажите новичку.
#2 by Jenya
CTRL+X CTRL+V
#3 by asady
' Макрос1 Макрос ' Макрос записан 17.10.2006 (s.arman) ' '    Cells.Select    Selection.ClearContents
#4 by asady
+ ClearContents Method See Also Applies To Example Specifics Clears the formulas from the range. Clears the data from a chart but leaves the formatting. expression.ClearContents expression   Required. An expression that returns a ChartArea or Range object. Example This example clears the formulas from cells A1:G37 on Sheet1 but leaves the formatting intact. Worksheets("Sheet1").Range("A1:G37").ClearContents This example clears the chart data from Chart1 but leaves the formatting intact. Charts("Chart1").ChartArea.ClearContents
#5 by asady
+ Delete Method See Also Applies To Example Specifics Delete method as it applies to the Range object. Deletes the object. expression.Delete(Shift) expression   Required. An expression that returns one of the above objects. Shift  Optional Variant.  Used only with Range objects. Specifies how to shift cells to replace deleted cells. Can be one of the following XlDeleteShiftDirection constants: xlShiftToLeft or xlShiftUp. If this argument is omitted, Microsoft Excel decides based on the shape of the range. Delete method as it applies to the ShapeNodes object. Deletes the object. expression.Delete(Index) expression   Required. An expression that returns one of the above objects. Index  Required Integer. Delete method as it applies to all other objects in the Applies To list. Deletes the object. expression.Delete expression   Required. An expression that returns one of the above objects. Remarks Deleting a Point or LegendKey object deletes the entire series. You can delete custom document properties, but you cannot delete a built-in document property. Example This example deletes cells A1:D10 on Sheet1 and shifts the remaining cells to the left. Worksheets("Sheet1").Range("A1:D10").Delete Shift:=xlShiftToLeft This example deletes Sheet3 in the active workbook without displaying the confirmation dialog box. This example sorts the data in the first column on Sheet1 and then deletes rows that contain duplicate data.    If nextCell.Value = currentCell.Value Then Loop
#6 by olchik
Это я знаю, а куда это все вставить - вот я открыла excel файл, а дальше - куда пишется Worksheets("Sheet1").Range("A1:D10").Delete Shift:=xlShiftToLeft???
#7 by olchik
Может есть у кого пример обработки по работе с excel файлом и его ячейками?
#8 by Jenya
Напиши нормально,что ты хотишь
#9 by asady
#10 by olchik
Хочу средствами 1с удалить несколько колонок из существующего excel файла
#11 by olchik
Как записать диапазон R2C10:R1206C21 через A1:D5 Применяю в Worksheet.Range("A1:D10").Delete(-4159);
Тэги:
Ответить:
Комментарии доступны только авторизированным пользователям

В этой группе 1С