It turns out that that DLLs were specifically designed to hold data, as are all Windows executables.Most of the pictures (button, icons, fonts) "in" a Windows application are stored in DLLs, or sometimes the EXE.As is the text for Menus, the structure of dialogs, and in particular strings....The easiest way for a newbie is to create a StringTable described at
http://msdn.microsoft.com/en-us/library ... ).aspxThen simply have a loop that converts the strings to doubles.This is pathetically easy to maintain, especially once you realise that the StringTable can itself be generated in C++, but also in Excel VBAYou then need to read up on the Resource Compiler which shoves the compiled resource onto your DLL or EXE.But that's not the only way...DLLs are just files, so provided it is not "open" by an application, you can read and write to it.You have a simple app that opens the DLL, seeks to the end, and writes data.When run, the DLL opens itself for reading (a call for read/write will fail), seeks to the end - the known length of the array (sizeof(double) * rows * cols) then reads.Coerce the buffer you've just read into an array, and off you go.The advanced student will recognise that there is actually no reason why the whole spreadsheet cannot be encapsulated into the DLL (or an EXE), so you could have a program that writes the spreadsheet to a temporary file, fires up Excel to run it, and the workbook includes a VBA project that references the code that launched Excel in the first place.This can be used to deal with the "where the fuck is my DLL" problem that I regularly get asked.Since the EXE or DLL can ask Win32 where it is, you can alter the VBA code in the buffer that points to it. That's fiddly, and of more use to XLL developers because that interface is designed to allow the user to say where a XLL or DLL lives.