Generate a file from calc

Hi,

PROBLEM SUMMARY

I want to generate a binary file from a Calc sheet, based on the data entered by the user in the Calc sheet cells.

SOME DETAILS

On of my software takes a binary file as an input and reads 64 bytes from it (64 BYTES x 8 bits per byte = 512 BIT data)
I have created a Calc file where each cell represents a BIT, and the user can select whether the BIT is SET or RESET.

I want that once the user chooses all the bit states, then from Calc I generate the binary file that can be input to my software.

Can some one give me any leads. I have basic knowledge about calc. If I get some help I can find my way out.

Thanks

I think a way, could be, convert groups of bits to characters in a second sheet and print this sheet with a text printer in a text file.