View Single Post
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
Lynn McGuire[_2_] Lynn McGuire[_2_] is offline
external usenet poster
 
Posts: 47
Default my latest C++ excel OLE automation code

On 12/28/2010 4:35 PM, Lynn McGuire wrote:
// fm2n_old.cpp


// The OLE Automation interface to Excel is mostly written using:
// "How to automate Excel from C++ without using MFC or #import"
// http://support.microsoft.com/kb/216686


// to call this code :
// if (ConnectToNotebook (notebook, RunInTestMode, true))
// {
// // do your excel data transfer here
// DisconnectFromNotebook (RunInTestMode);
// }

// see getCellInfo or putCellInfo for single cell data transfer examples

// see PutRowInTable for bulk transfer example, note that the more data can
// be transferred at one time, the faster the data transfer is

//void PutRowInTable (std::string title, std::string number, std::string units, int offset)
//{
// InitTable (1, 3);
// PutStringInTable (title);
// if (units.size () 0)
// PutStringInTable (SetUnitsCase (units));
// else
// PutBlankInTable (1);
// double temp = AsDouble (number);
// PutDoubleInTable (temp);
// SendTableToServer (offset, 1, offset, 3);

Lynn