``````
using namespace Microsoft::Office::Core;
//using namespace Microsoft::Office::Interop::Excel;		//To avoid pain with errors due to clashes with "Application" by using this we use the below instead
using namespace Microsoft::Office::Interop;
``````
##### Create Object
``````
private: Excel::Application ^ExcelApp1;

ExcelApp1 = gcnew Excel::Application();
``````

#### Reading Cells In A Worksheet

``````
try
{
txtOutput->Text = "";

//----- OPEN EXCEL WORKBOOK -----
0,
true,
5,
"",
"",
true,
Excel::XlPlatform::xlWindows,
"\t",
false,
false,
0,
true,
1,
0);

//----- OPEN THE WORKSHEET -----
/* Use this if you need to deal with workbooks with multiple sheets
int SheetNumber;
for (SheetNumber = 1; SheetNumber <= WorkBook1->Sheets->Count; SheetNumber++)
{
}
*/
Excel::Worksheet ^WorkSheet1 = (Excel::Worksheet^)WorkBook1->ActiveSheet;

//If you don't know which cells your after you can use this:
//Excel::Range ^ExcelRange1 = Sheet1->UsedRange;

int RowIndex = 1;
int ColumnIndex = 1;
String ^CellValue;

for (RowIndex = 1; RowIndex <= 10; RowIndex++)
{
for (ColumnIndex = 1; ColumnIndex <= 3; ColumnIndex++)
{
if (((Excel::Range^)WorkSheet1->Cells[(System::Object^)RowIndex, (System::Object^)ColumnIndex])->Value2 != nullptr)
{
//CELL HAS A VALUE
CellValue = ((Excel::Range^)WorkSheet1->Cells[(System::Object^)RowIndex, (System::Object^)ColumnIndex])->Value2->ToString();

txtOutput->Text += "'" + CellValue + "'";
}
else
{
//CELL IS BLANK
txtOutput->Text += "#";
}
}
txtOutput->Text += "\r\n";
}

//----- CLOSE WORKBOOK -----
{"ft_lang_label":"__label__en","ft_lang_prob":0.61835223,"math_prob":0.8979582,"size":2580,"snap":"2020-45-2020-50","text_gpt3_token_len":653,"char_repetition_ratio":0.10170808,"word_repetition_ratio":0.0,"special_character_ratio":0.29457363,"punctuation_ratio":0.24034335,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9939014,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-04T13:23:03Z\",\"WARC-Record-ID\":\"<urn:uuid:f0d72609-c77f-4da8-96c1-d90855b59ced>\",\"Content-Length\":\"56187\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:58696465-d36b-4100-a364-dfb9544e4916>\",\"WARC-Concurrent-To\":\"<urn:uuid:1a774a76-d7d3-44af-8d82-6a3006ec994c>\",\"WARC-IP-Address\":\"104.18.55.181\",\"WARC-Target-URI\":\"https://electronic-design.net/visual-cpp-cli-dot-net/office/excel/reading-from-excel\",\"WARC-Payload-Digest\":\"sha1:MKYECJKPKHISGNX2UEC4WGXLL63ZULCR\",\"WARC-Block-Digest\":\"sha1:H2CTLWVKESX2BBNBKXEGNPECNJVDPIFP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141737946.86_warc_CC-MAIN-20201204131750-20201204161750-00103.warc.gz\"}"}