Muestra un archivo en formato hex usando excel
Sub hexedit() Dim book As Workbook Dim sheet As Worksheet Dim colname As String Dim mibyte As Byte Set book = Application.Workbooks.Add Set sheet = book.Sheets.Add sheet.Range("A:A").ColumnWidth = 12 sheet.Range("A1").Value = "Direccion" sheet.Range("A1").HorizontalAlignment = xlHAlignCenter For f = 1 To 16 colname = Chr(Asc("A") + f) sheet.Range(colname + "1").Value = Hex(f - 1) colname = colname + ":" + colname sheet.Range(colname).ColumnWidth = 4 sheet.Range(colname).HorizontalAlignment = xlHAlignCenter Next f Open Environ("UserProfile") + "\downloads\" + "GRAFICO.SEC" For Binary As #1 For f = 1 To LOF(1) Get 1, f, mibyte columna = Chr(Asc("B") + ((f - 1) Mod 16)) fila = Int((f - 1) / 16) + 2 sheet.Range(columna & fila).Value = Hex$((mibyte)) If mibyte <> 13 And mibyte <> 15 Then sheet.Cells(fila, 18 + ((f - 1) Mod 16)).Value = ChrB(mibyte) End If Next f Close 1 End Sub