Cell reference by name in Excel.Application in ASP

How to refer to a cell by name, not Row, Col?

I currently have the following code:

Set oExcel = CreateObject("Excel.Application")
Set oWorkbook = oExcel.Workbooks.Open(sPathToTemplate)

oExcel.Cells(1,1).Value = strShippingName

But instead of referring to the shipping name as "1,1", I would like to call it his name "shipping_name"

But this clearly does not work:

oExcel.Cells("shipping_name").Value

Any ideas? It seems I can not find any documentation on Excel.Application in any of my books ... If anyone knows any online materials that would be good too.

thank

+3
source share
1 answer
oExcel.Range("shipping_name").Value = strShippingName
+1
source

Source: https://habr.com/ru/post/1779063/


All Articles