这是我的代码:
ipcRenderer.on('printImage', (event, arg) => {
var divImage = document.getElementById(idDiv)
if (divImage !== null && divImage !== undefined)
divImage.getElementsByTagName('img')[0].src = arg.pathImage
})
答案 0 :(得分:0)
您可以使用For ... Next
遍历Y列中的每个单元格。例如,这遍历单元格Y1到Y100:
'[...]
Dim i as Long
Dim first_row As Long
Dim last_row As Long
first_row = 1
last_row = 100
For i = first_row To last_row
e_name = Range("A" & i)
LValue = "Your" & e_name
Segment = Application.WorksheetFunction.VLookup(LValue, Sheets("Temp").Range("C:N"), 12, True)
Range("Y" & i).Value = Segment
Next i
'[...]
答案 1 :(得分:0)
这可以做到。它将继续从A3向下移动,直到没有更多数据,然后写入Y列的同一行。
将以下内容粘贴到底部,替换ActiveSheet.Paste
之后的所有内容:
Dim e_name As String
Dim LValue As String
Dim c As Range
With Sheets("Exception Data")
For Each c In .Range("A3", "A" & .Cells(.Rows.Count, "A").End(xlUp).Row)
e_name = c.Value
LValue = "Your" & e_name
Segment = Application.WorksheetFunction.VLookup(LValue, Sheets("Temp").Range("C:N"), 12, True)
c.Offset(0, 24).Value = Segment ' write to column A, offset by 24 to the right - column Y
Next
End With
Application.DisplayAlerts = False
Sheets("Temp").Delete
Application.DisplayAlerts = False