View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Help reading binary file


workbooks.add
activesheet.name="BINARYFILE"
...

use FileLEN to get the length of file.


cant use INPUT on binary files, you'll need GET/PUT instead.
see VBA help on GET statement

sorry to be brief, hope it gets you on the way.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Luis wrote :

I would like to open the data contained in a binary file in to an
excel worksheet. I can open the binary file in python with the
following script

FileNum = FreeFile ' Supply next available number
BinaryFile = Application.GetOpenFilename
'Workbooks.Add
Set NewSheet = Sheets.Add(Type:=xlWorksheet)
'NewSheet.Name = BinaryFile 'THIS DOESN"T WORK
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
NewSheet.Select

SNIP


Am I using the Input # function correclty, or is there an alternative
to get data form the binary
file

TIA

Luis