Reading Cell Values in Multiple Threads Simultaneously with Golang via C++

Contents
[ ]

To read cell values in more than one thread simultaneously, set Worksheet.GetMultiThreadReading() to true. If you do not, you might get incorrect cell values.

The following code:

  1. Creates a workbook.
  2. Adds a worksheet.
  3. Populates the worksheet with string values.
  4. Creates two threads that simultaneously read values from random cells. If the values read are correct, nothing happens. If the values read are incorrect, a message is displayed.

If you comment this line:

  
testWorkbook.get_Worksheets().Get(0).get_Cells().set_MultiThreadReading(true);  

then the following message is displayed:

  
if (s != "R" + row + "C" + col)  
{  
    MessageBox::Show("This message box will show up when the cell values read are incorrect.");  
}  

Otherwise, the program runs without showing any message, which means all values read from cells are correct.