Results 1 to 14 of 14

Read binary data from non excel file and post in excel file

Threaded View

  1. #1
    Registered User
    Join Date
    12-29-2014
    Location
    Hyderabad ,India
    MS-Off Ver
    2007
    Posts
    6

    Read binary data from non excel file and post in excel file

    I am Trying to read data as Bytes from a non Excel File by opening it as Binary and write the same data in Bytes in an excel file through the following VB Program.I am able to Read Successfully from the non Excel file but the data read in Bytes is not getting posted in the Sheet4(Not the Active Sheet) of the Currently Active Excel workbook.I will be thankful if any body help me in this regard.please note that i am new to EXCEL VBA.

    Function RWfile (FilePath As String)
    Dim Filenumber As Integer
    Dim Byet(10) As Byte
    Dim I As Integer
    Set fso = CreateObject("Scripting.FilesystemObject") 
    If fso.Fileexists(Filepath) Then
    Filenumber = FreeFile
    Open Filepath For Binary Access Read Write As #Filenumber 
    For I = 1 To 10
    Get #Filenumber, , Byet(I)
    Sheets("Sheet4").Cells(I, 1).Value = (I)Byet
    Next I
    End If
    Close #Filenumber 
    End Function
    Last edited by Leith Ross; 12-29-2014 at 08:55 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to speed up binary file read?
    By XmisterIS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2014, 11:39 AM
  2. Importing a Binary File, displaying as Hex, and saving the file as a Binary file again
    By bluenose616 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2014, 04:46 PM
  3. read value of strings from a text file and make an excel file.
    By gashforing in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-08-2009, 07:12 AM
  4. [SOLVED] Pasword protected Excel file encrypted, how do I read this file?
    By jonesteam in forum Excel General
    Replies: 2
    Last Post: 12-12-2005, 02:35 PM
  5. read a Unix binary file
    By Arnaud Boëlle in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1