Page 1 of 1
Excel 2 C++ or C#
Posted: July 29th, 2012, 2:04 am
by ranbanka
I have a 3rd party software, which is updating stock ticks in excel sheet. This software create a temp excel and updating(not appending) tick in same row for single stock.Now i want to pass this changed row data to my C++ or C# program to store ticks or do calculation on matlab enginee.somebody let me know, what is best way to pass this data from excel sheet to C++ or C#.1. using named pipe or socket.2. is there way, C++ or C# can get event for row change and using handle of excel they can directtly access data.
Excel 2 C++ or C#
Posted: August 2nd, 2012, 1:05 am
by zhouxing
How this 3rd party software publish data to this temp sheet? Forcefully write to the cell? some kind of RTD? or something else? If there is a way to directly intercept its "writing", it may be the best option.If you have to capture the tick from the temp excel sheet itself, the first thing you will have to do is to get a handle of the temp sheet (binding using Marshal?) If you can achieve this, both C++ and C# can hook to all these changed events, though personally I think programming in C# is easier.
Excel 2 C++ or C#
Posted: August 2nd, 2012, 3:07 am
by ranbanka
This temp excel looks like embeded in C# program and not getting hook of this excel. so i used vba worksheet change function to write in separate file and reading from there. I am thinking they used DDE or OLE to writting this temp excel.using vba i may get delay of 1-2 second, but that is enough for retail trading, i can do calculation for 100 stocks at time, instead of looking data or single chart.