【发布时间】:2014-09-03 15:11:03
【问题描述】:
我最近从 windows 迁移到 pclinuxos 并且似乎喜欢它。我面临的唯一问题是 libreoffice,默认的电子表格包与 excel 宏不兼容。下面是我的vba代码:
Option VBASupport
Sub DeleteToLeft()
Selection.SpecialCells(xlBlanks).Delete shift:=xlToLeft
End Sub
Function SinceLastWash()
Application.Volatile
WashCount = 0
WearCount = 0
CurrentRow = Application.ThisCell.Row
For i = 3 To 35
If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "a" Then
WearCount = WearCount + 1
End If
If Range(Cells(CurrentRow, i), Cells(CurrentRow, i)).Value = "q" Then
WashCount = WashCount + 1
WearCount = 0
End If
Next i
SinceLastWash = WearCount
End Function
Function testhis()
testhis = Application.ThisCell.Row
End Function
有没有办法转换此代码以使其与 libreoffice 兼容,还是我必须学习一种全新的语言,例如 python?学习 python 不是问题,但不是我的问题的解决方案,因为我在 excel 中有许多与工作相关的文件,其中有很多 vba 代码,我无法在工作中使用开放式办公室/libreoffice...
我只想补充一点,SinceLastWash 函数在我使用它的某些单元格中给出了正确的值,而在其他单元格中给出了错误 #NAME?
谢谢
【问题讨论】:
标签: excel vba openoffice.org libreoffice