Dim a As Integer, c As Integer, d As Integer, i As Integer, f As Variant
a = 0
aa:
a = a + 1
If Cells(a, 1).Value <> "" Then
GoTo aa
End If
For i = 1 To a - 1
c = ""
d = ""
f = ""
c = InStr(1, Cells(i, 1), ">", 1)
d = InStr(1, Cells(i, 1), "</", 1)
f = Mid(Cells(i, 1), c + 1, (d - c - 4)) * 4
f.NumberFormatLocal = "@"
If Len(f) > 5 Then
f.NumberFormatLocal = "0.000000"
f.NumberFormatLocal = "@"
Else
f = f & ".0"
End If
If Mid(Cells(i, 1), d - 3, 3) = "dip" Then
Cells(i, 2) = Left(Cells(i, 1), c)
Cells(i, 2) = Cells(i, 2) & f & "px</dimen>"
Else
Cells(i, 2) = Cells(i, 1)
End If
Next
위 매크로를 이용하여
텍스트편집기로 dimens.xml을 열어 내용만 복사한 후 시트(A1)에 붙여넣고
매크로실행후 (B1)을 복사하여 역으로 편집기에 덮어쒸우고 저장.
컴파일하여 적용하면 DPI에 대응됨. (별 중요한 내용은 아니지만 혹시 필요하신분 계시면..)