|
-
Sep 28th, 2006, 04:36 PM
#1
Thread Starter
New Member
Reading a Binary File into Excel using VBA
Everyone,
I'm trying to write a program that takes a binary file that contains 5000, short (8 bit) words and spits them out into an excel sheet in individual cells, preferably each in it's own row.
This file is written by an Allen-Bradley CompactLogix PLC (programmable logic controller) and I need to extract the data for analysis. The test program I wrote for the PLC wrote 5000 instances of the integer 3277 to the file but when I open the file with a text editor, I get garbage. I'm assuming it's trying to display the ASCII equivalent of each 8 bit word. For example, the file looks like this, only 5000 times:
್
What the PLC actually does, is split the 3277 integer into two short ints and writes the binary equivalent to the file.
Bottom line: I want to take data eight bits at a time from a binary file, place them into an individual cell, convert them back to decimal and analyze. Any help would be greatly appriciated.
Kevin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|