This project has moved. For the latest updates, please go here.
1
Vote

[Solved]:Set cell value with named cell/range instead of coordinates

description

I would like to be able to set cell values with named cells/ranges instead of coordinates:

ws.Range("profits").Value = 66;

Also see
https://stackoverflow.com/questions/43910827/how-to-set-value-of-excel-cell-by-name-instead-of-using-coordinates-with-excelpa

comments

eis wrote May 11 at 1:24 PM

Found the solution:

var profits = pck.Workbook.Names["profits"];
profits.Value = 66;