If someone knows how to go from Excel::Window pointer to real value in opened Excel cell, please let me know. Here is the task conditions: - Excel is currently running in one s
Daniil,
I believe you are using the Excel COM to access it. I've never done this using C++, but I guess it shouldn't be much different than C#. Your toughest task should be importing the necessary libraries to do so. But I believe you have done that already.
You should use something like this:
int full_cells = 0;
Excel::_Worksheet worksheet = pWindow->ActiveSheet;
for(int j = 1; j < worksheet.Columns.Count; j++)
{
for (int i = 1; i < worksheet.Rows.Count; i++)
{
if(worksheet.Cells[i][j].Value != "")
{
full_cells++;
cout << worksheet.Cells[i][j].Value;
}
}
}
Please note I haven't tested this code. I'm just showing you what it is supposed to look like. You should read the documentation here: http://msdn.microsoft.com/en-us/library/ms262200.aspx and use it appropriately.
Hope it helps.