Advertisement
LO_Ralle

LStAusBrutto

Nov 22nd, 2023
1,678
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Option Explicit
  2.  
  3. Dim oDoc as Object, oSheet as Object
  4.  
  5. Dim aBrutto(1 to 12) as Double
  6. Dim dLSt as Double
  7.  
  8. Dim i as integer
  9.  
  10. Sub GetData
  11. REM Holt die Daten aus allen Tabellen "Januar" = 0 bis Dezember = 11 und setzt sie in Zwischentabelle ein
  12. REM Setzt Daten in Berechnungstabelle "Ablauf" 
  13.  
  14.     For  i = 0 to 11
  15.         ' Daten holen
  16.         oSheet = ThisComponent.sheets(i)
  17.         aBrutto(i+1) = oSheet.getCellRangeByName("G36").getValue()
  18.         ' Daten einsetzen in Tab. "Übersicht"
  19.         ThisComponent.sheets(14).getCellByPosition(4,i+3).setValue(aBrutto(i+1))
  20.         'Wert in Tab. "Ablauf" einsetzen in Cent
  21.         ThisComponent.sheets(13).getCellRangeByName("B16").setValue(aBrutto(i+1)*100)
  22.         'LSt aus Tabelle ablesen in Cent
  23.         dLSt= ThisComponent.sheets(13).getCellRangeByName("B231").getValue()
  24.         ' und in Tab "Übersicht" einsetzen in Euro
  25.         ThisComponent.sheets(14).getCellByPosition(5,i+3).setValue(dLSt/100)
  26.  
  27.     Next
  28.     MsgBox("Habe fertig!!",64,"Hinweis")
  29. End Sub
Advertisement
Comments
  • LO_Ralle
    1 year
    # text 0.16 KB | 0 0
    1. "Quick 'n'Dirty" solution to read the salary from 12 tables and set it in into a template to calculate the tax.
    2. Read the tax and set it in to a separate tablecolumn
Add Comment
Please, Sign In to add comment
Advertisement