0
私は、ERPから2つの関連するエクスポートされたcsvレポートを取得し、それらを読み取り、Excel出力で作成したAccessプログラムを持っています。私は、Excelの 'Format Cells'、 'Border'、そして 'Outline'と 'Inside'をヒットさせると、読みやすくなります。太字の枠線でレポートをExcelにアクセスできますか?
これを私のコードに追加して、Excel出力を作成するようにしたいと思います。
Do Until mydeptset.EOF
mypos = mydeptset.AbsolutePosition
If mypos > 0 Then
If Int(mypos/10) > 0 Then
If mypos Mod 10 = 0 Then
m = 2
n = k + 5
.Activate
.Range("A1:AF5").Select
myxls.Selection.Copy
.Range("A" & CStr(n)).Select
.Paste
.Range("A" & n + 3 & ":AF" & CStr(n + 3)).Clear
mydtset.MoveFirst
n = n + 5
k = n
Do Until mydtset.EOF
.Cells(k, 1) = mydtset!dt
mydtset.MoveNext
k = k + 1
Loop
.Cells(k, 1) = "Tot"
.Cells(k, 1).HorizontalAlignment = 2
.Cells(k, 1).Font.Bold = True
End If
End If
Else
n = 4
mydtset.MoveFirst
m = 2
k = 6
Do Until mydtset.EOF
.Cells(k, 1) = mydtset!dt
mydtset.MoveNext
k = k + 1
Loop
.Cells(k, 1) = "Tot"
.Cells(k, 1).HorizontalAlignment = 2
.Cells(k, 1).Font.Bold = True
End If
If n = 4 Then
k = 4
Else
k = n - 2
End If
.Cells(k, m) = mydeptset!drname
With .Cells(k, m)
.Font.Bold = True
.Font.Size = 8
.HorizontalAlignment = 1
End With