Error -2146827284 When Writing Data to a Cell in an Excel Report

Updated Aug 22, 2018

Reported In

Software

  • LabVIEW
  • LabVIEW Report Generation Toolkit

Other

Microsoft Excel

Issue Details

When writing data to a cell in an Excel report using the Report Generation Toolkit in LabVIEW, the following error shows up:
 
Why is this happening and how can I fix this error?

Solution

This error is generated when trying to write to a locked cell in a Excel sheet that is protected, you need to unprotect the Excel sheet in order to be able to write data to the cell. If the Excel sheet must be protected for security reasons, follow the steps below to unlock the cell or a region of cells.

1.- Un protect the Excel sheet temporarily by opening the Excel sheet, going to the Review tab, and clicking the Unprotect button. You may be asked for a password.
2.- Select the range of cells you wish to unlock (i.e. write data to even when the Excel sheet is protected).
3.- Right click the range of cells and click Format Cells...
4.- Select the Protection tab in the Format Cells dialog window.
5.- Uncheck the Locked checkbox.
6.- Go to the Review tab again to protect your Excel sheet.

You may now be able to write data to the unlocked cells in your Excel sheet.

WAS THIS ARTICLE HELPFUL?

Not Helpful