Имя: Пароль:
1C
 
v8: Как из 1С удалить столбцы или колонки в Excel?
0 olchik
 
17.10.06
10:56
1 olchik
 
17.10.06
10:56
Подскажите новичку.
2 Jenya
 
17.10.06
10:57
CTRL+X CTRL+V
3 asady
 
17.10.06
10:57
Sub Макрос1()
'
' Макрос1 Макрос
' Макрос записан 17.10.2006 (s.arman)
'

'
   Cells.Select
   Selection.ClearContents
4 asady
 
17.10.06
10:58
(3)+
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 asady
 
17.10.06
11:02
(4)+
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.

Application.DisplayAlerts = False
Worksheets("Sheet3").Delete
Application.DisplayAlerts = True
This example sorts the data in the first column on Sheet1 and then deletes rows that contain duplicate data.

Worksheets("Sheet1").Range("A1").Sort _
       key1:=Worksheets("Sheet1").Range("A1")
Set currentCell = Worksheets("Sheet1").Range("A1")
Do While Not IsEmpty(currentCell)
   Set nextCell = currentCell.Offset(1, 0)
   If nextCell.Value = currentCell.Value Then
       currentCell.EntireRow.Delete
   End If
   Set currentCell = nextCell
Loop
6 olchik
 
17.10.06
11:08
Это я знаю, а куда это все вставить - вот я открыла excel файл, а дальше - куда пишется Worksheets("Sheet1").Range("A1:D10").Delete Shift:=xlShiftToLeft???
7 olchik
 
17.10.06
11:11
Может есть у кого пример обработки по работе с excel файлом и его ячейками?
8 Jenya
 
17.10.06
11:11
Напиши нормально,что ты хотишь
9 asady
 
17.10.06
11:15
Worksheet=WorkBook.Worksheets(1);
Worksheet.Range("A1:D10").Delete(-4159);
10 olchik
 
17.10.06
11:15
Хочу средствами 1с удалить несколько колонок из существующего excel файла
11 olchik
 
17.10.06
16:21
Как записать диапазон R2C10:R1206C21 через A1:D5
Применяю в Worksheet.Range("A1:D10").Delete(-4159);
Выдавать глобальные идеи — это удовольствие; искать сволочные маленькие ошибки — вот настоящая работа. Фредерик Брукс-младший