04-11-2008 08:15 AM
04-14-2008 04:18 AM
10-01-2018 05:54 PM
Were you able to accomplish this way back then. I am having the same issue. The demo projects do not help in locating and importing a current cell position within an open xlsx file. Are there any more details available?
BR
10-02-2018 04:27 AM - edited 10-02-2018 04:28 AM
Accessing a random cell in an Excel sheet is quite easy: this is a function I am using to write a string to a cell with row / col received as function parameters. You can use it a framework to develop your own reading functions.
int WriteString (char *text, int col, int row, VARIANT MyVariant, CAObjHandle *ExcelRangeHandle) { int error = 0; errChk (CA_VariantSetCString (&MyVariant, text)); errChk (Excel_RangeSetItem (*ExcelRangeHandle, NULL, CA_VariantInt (row), CA_VariantInt (col), MyVariant)); errChk (CA_VariantClear (&MyVariant)); Error: return error; }