如何在groupby-aggregate表达式中结合UDAF和函数?

我正在尝试开发一个自定义描述。为此,我将结合pyspark.sql.functions中的函数与其他用户聚合的自定义函数(UDAF)。 代码如下:

Public Sub Main()

    Dim i,nb_tableaux                  As Integer
    Dim j,lignemax,BarWidth           As Long
    Dim Progresspercentage              As Double
    Dim echeancier,nomtableau          As String
    Dim ws_data                         As Worksheet
    Dim c As Range

    Me.ProgressLabel.Caption = "Initialisation terminée. "
    Set ws_data = Sheets("Data")
    lignemax = ws_data.Range("DATA").Rows.Count

    Application.ScreenUpdating = True
    Application.EnableEvents = True

    nb_tableaux = 17

    For i = 1 To nb_tableaux
        echeancier = tab_Tableaux(i,0)
        nomtableau = tab_Tableaux(i,1)
        Me.ProgressLabel.Caption = "En cours : " & echeancier
        ws_data.Range(nomtableau).Calculate
        'With Worksheets("Data")
            For j = 1 To lignemax
                For Each c In ws_data.Range(nomtableau).Rows(j)
                    formulaToCopy = c.Formula
                    c.ClearContents
                    c.Value = formulaToCopy
                    DoEvents
                Next
                Me.ProgressLabel.Caption = "En cours : " & echeancier & "," & Format(j / lignemax,"0.0%") & " completed"
                Me.Repaint
            Next j
        'End With
        Me.Bar.Width = i * 200 / nb_tableaux
        Me.Bar.Caption = Format(i / nb_tableaux,"0%") & " completed"
    Next i

    Application.ScreenUpdating = False
    Application.EnableEvents = False

End Sub

抛出的错误很长,所以我只复制最后出现的异常。

如何在groupby-aggregate表达式中结合UDAF和函数?

有人知道该如何解决吗?

HwaMn 回答:如何在groupby-aggregate表达式中结合UDAF和函数?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3159303.html

大家都在问