我有一个excel,用于记录您摄取特定日期和膳食的食物.我有一个网格,其中每一行代表你吃的食物,它有多少糖,等等.
然后我添加了一个保存按钮,将所有数据保存到另一个表格中的表格中.
这就是我尝试过的
Public Sub addDataToTable(ByVal strTableName As String, ByRef arrData As Variant)
Dim lLastRow As Long
Dim iHeader As Integer
Dim iCount As Integer
With Worksheets(4).ListObjects(strTableName)
'find the last row of the list
lLastRow = Worksheets(4).ListObjects(strTableName).ListRows.Count
'shift from an extra row if list has header
If .Sort.Header = xlYes Then
iHeader = 1
Else
iHeader = 0
End If
End With
'Cycle the array to add each value
For iCount = LBound(arrData) To UBound(arrData)
**Worksheets(4).Cells(lLastRow + 1, iCount).Value = …
Run Code Online (Sandbox Code Playgroud) 我有个问题.
我在我的项目中使用高清,我想知道是否可以在工具提示中显示图像(在这种情况下,我想显示谷歌地图静态图像)?
提前致谢
我在网格上有这个:
{ xtype: 'actioncolumn',
renderer: function (val, metadata, record) {
if (record.raw.possibleActions != 2) {
this.items[0].icon = '';
this.items[0].tooltip = '';
}
metadata.style = 'cursor: pointer;';
return val;
},
width: 30,
align: 'center',
sortable: false,
items: [{
icon: 'images/edit.png',
tooltip: 'stuff',
handler: function (grid, rowIndex, colIndex) {
'do stuff'
}
}]
},
Run Code Online (Sandbox Code Playgroud)
当字段"possibleActions"不同于2时,我想要隐藏动作列的图标.
有了这个,this.items[0].icon = '';
它将从所有列中删除图标......
如何访问与条件匹配的特定行的列?