Excel Cell Alignment Issue

#1
Hi,
I used the Following code for formatting the cell in excel.

sheet.Range(Reference).VerticalAlignment = Excel.Constants.xlCenter

Getting the following error when I run this code from the process.

Public member 'Constants' on type 'Application' not found.

Please help out this issue
 
Top