I have this current code, which types "AAPL" into an excel sheet, and the returns the corresponding value.
I would like to make it so that after cout << "Ticker: ";
i can type in a ticker symbol (such as AAPL) and use this as the variant_t ticker = "xxx".
I tried doing so by using string
but i get an error that says cannot convert from 'std::string to const _variant_t &'
Is there anyway to do this? Thanks in advance.
XL->Workbooks->Open(L"F:\\xxx\\Desktop\\fxxxx.xlsx");
Excel::RangePtr pRange = pSheet->Cells;
cout << "Ticker: ";
variant_t ticker = "AAPL";
pRange->Item[2][1] = ticker;
double value = pRange->Item[2][2];
cout << "\n Value = " << value << endl;