1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
| Option Explicit
Dim UnFichier As String
Dim YaFichier As String
Const Rep = "C:\Documents and Settings\sgallo\Desktop\Elodie_fichier\" ' le répertoire contenant mes fichiers..
Private Sub CommandButton1_Click()
YaFichier = "C:\Documents and Settings\sgallo\Desktop\Elodie_fichier\Algeria"
Workbooks.OpenText YaFichier, Origin:= _
437, StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), _
Array(8, 1), Array(16, 1), Array(25, 1), Array(27, 1), Array(29, 1), Array(30, 1), Array(38 _
, 1), Array(40, 1), Array(42, 1), Array(44, 1), Array(52, 1), Array(61, 1), Array(67, 1), _
Array(73, 1), Array(76, 1), Array(79, 1), Array(85, 1), Array(87, 1), Array(91, 1), Array( _
93, 1), Array(99, 1), Array(105, 1), Array(108, 1), Array(111, 1), Array(112, 1), Array(113 _
, 1), Array(120, 1), Array(126, 1)), TrailingMinusNumbers:=True
Sheets("algeria").Select
Sheets("algeria").Rows("1:1").Select
Selection.Insert Shift:=xlDown
Sheets("algeria").Range("A1").Select
ActiveCell.FormulaR1C1 = "BGI Source N°"
Sheets("algeria").Range("B1").Select
ActiveCell.FormulaR1C1 = "Latitude"
Sheets("algeria").Range("C1").Select
ActiveCell.FormulaR1C1 = "Longitude"
Sheets("algeria").Range("D1").Select
ActiveCell.FormulaR1C1 = "Accuracy position"
Sheets("algeria").Range("E1").Select
ActiveCell.FormulaR1C1 = "Syst. Position"
Sheets("algeria").Range("F1").Select
ActiveCell.FormulaR1C1 = "Type observation"
Sheets("algeria").Range("G1").Select
ActiveCell.FormulaR1C1 = "Station elevation"
Sheets("algeria").Range("H1").Select
ActiveCell.FormulaR1C1 = "Elevation type"
Sheets("algeria").Range("I1").Select
ActiveCell.FormulaR1C1 = "Accuracy elevation"
Sheets("algeria").Range("J1").Select
ActiveCell.FormulaR1C1 = "Determination elevation"
Sheets("algeria").Range("K1").Select
ActiveCell.FormulaR1C1 = "Sup elevation"
Sheets("algeria").Range("L1").Select
ActiveCell.FormulaR1C1 = "Observed gravity"
Sheets("algeria").Range("M1").Select
ActiveCell.FormulaR1C1 = "Free air"
Sheets("algeria").Range("N1").Select
ActiveCell.FormulaR1C1 = "Bouguer"
Sheets("algeria").Range("O1").Select
ActiveCell.FormulaR1C1 = "Dev free air"
Sheets("algeria").Range("P1").Select
ActiveCell.FormulaR1C1 = "Dev Bouguer"
Sheets("algeria").Range("Q1").Select
ActiveCell.FormulaR1C1 = "CT"
Sheets("algeria").Range("R1").Select
ActiveCell.FormulaR1C1 = "Info terrain"
Sheets("algeria").Range("S1").Select
ActiveCell.FormulaR1C1 = "CT density"
Sheets("algeria").Range("T1").Select
ActiveCell.FormulaR1C1 = "Accuracy gravity"
Sheets("algeria").Range("U1").Select
ActiveCell.FormulaR1C1 = "Correction gravity"
Sheets("algeria").Range("V1").Select
ActiveCell.FormulaR1C1 = "Ref station"
Sheets("algeria").Range("W1").Select
ActiveCell.FormulaR1C1 = "Apparetus"
Sheets("algeria").Range("X1").Select
ActiveCell.FormulaR1C1 = "Country"
Sheets("algeria").Range("Y1").Select
ActiveCell.FormulaR1C1 = "Confidentiality"
Sheets("algeria").Range("Z1").Select
ActiveCell.FormulaR1C1 = "Validity"
Sheets("algeria").Range("AA1").Select
ActiveCell.FormulaR1C1 = "N° station"
Sheets("algeria").Range("AB1").Select
ActiveCell.FormulaR1C1 = "Sequence N°"
Sheets("algeria").Range("A1:AB10396").Select
Sheets("algeria").Range("B8").Activate
Sheets("algeria").Columns("C:C").EntireColumn.AutoFit
ChDir "C:\Documents and Settings\sgallo\Desktop\Elodie_fichier"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\sgallo\Desktop\Elodie_fichier\Book1.xls", _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWindow.Close
End Sub |
Partager