【问题标题】:OpenOffice Calc Merged Cell propertiesOpenOffice Calc 合并单元格属性
【发布时间】:2018-08-18 23:19:07
【问题描述】:

我已经在网上搜索了几个小时,但找不到答案。我可以确定给定单元格已合并,但我需要知道合并单元格中包含多少行。

Function aac_MergeRowCount(intStartCol as Integer, intStartRow as Integer)
oSheet = ThisComponent.CurrentController.ActiveSheet
oCell = oSheet.GetCellByPosition(intStartCol, intStartRow)
strData = oCell.GetString()

If oCell.IsMerged Then
    strCopy = strData
    strWasMerged = True
    iCount = oCell.GetNumberOfRows()
End If

aac_MergeRowCount = iCount
End Function

【问题讨论】:

  • 我尝试过使用 getcellrangebyposition 但这需要一个开始行和结束行 - 如果我知道结束行,我就不需要该函数。

标签: vba openoffice-calc


【解决方案1】:

原来我只需要放弃 OpenOffice 并使用 Excel。我需要的命令是:

strData = oSheet.Cells(r, c).MergeArea.Rows.Count

这在 OpenOffice 中不起作用

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-29
    • 1970-01-01
    • 1970-01-01
    • 2015-12-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多