ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   my latest C++ excel OLE automation code (https://www.excelbanter.com/excel-programming/444065-re-my-latest-c-excel-ole-automation-code.html)

Lynn McGuire[_2_]

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


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com