On Thu, Feb 21, 2013 at 9:02 PM, Andrew Douglas Pitonyak <and...@pitonyak.org> wrote: > > On 02/21/2013 07:37 PM, Rob Weir wrote: >> >> On Thu, Feb 21, 2013 at 2:10 PM, Nathan Pimental <nathansai...@gmail.com> >> wrote: >>> >>> I'm not sure if help for reading direct binary or hex is being looked >>> for, >>> or even wanted, but I would be glad to develop a dll that reads and >>> writes >>> pure 1s and 0s for oo. >> >> What would be an example of scenario where this would be useful? >> >> OpenOffice obviously reads specific binary formats, such as MS Word >> Doc files, or JPEG images, etc. But what would be the case for >> generic binary or hex support? >> >> Maybe reading data into a spreadsheet from instruments or sensors? >> OpenOffice Calc + Arduino ??? > > I have certainly had a few times when I needed to inspect files at a binary > level. I have even had the need to edit files at a binary level and write > them back out. > > You asked for examples... > > 1. My ODT file is damaged and it cannot be opened. > > $ hexdump -C some_file.odt > > 00000000 50 4b 03 04 14 00 00 08 00 00 c5 0c e4 3c 5e c6 > |PK...........<^.| > 00000010 32 0c 27 00 00 00 27 00 00 00 08 00 00 00 6d 69 > |2.'...'.......mi| > 00000020 6d 65 74 79 70 65 61 70 70 6c 69 63 61 74 69 6f > |metypeapplicatio| > 00000030 6e 2f 76 6e 64 2e 6f 61 73 69 73 2e 6f 70 65 6e > |n/vnd.oasis.open| > 00000040 64 6f 63 75 6d 65 6e 74 2e 74 65 78 74 50 4b 03 > |document.textPK.| > > 2. Check if a file begins with a bight order mark (BOM). For example, if the > file begins with 0xEF,0xBB,0xBF, that means something different than if it > beings with U+FEFF. > > 3. I used a binary editor to modify a PDF file to remove a watermark. >
OK. I've done that as well, but wasn't connecting that to Nathan's query. I was thinking of bringing binary data into a document, like into cells of a spreadsheet, e.g., code that brings in data from an RS 232 serial port and places values into a cell, and then triggers a recalc/chart update, etc. -Rob > > > -- > Andrew Pitonyak > My Macro Document: http://www.pitonyak.org/AndrewMacro.odt > Info: http://www.pitonyak.org/oo.php >