Can you make a macro compatible between LibreOffice and MS Excel?

I’m working with a sheet where I’ve configured a button with a Macro to delete some headers and export the .xlsm to .csv format.

The Macro works fine but I’m aware most people using our App will be using MS Excel, so I’m wondering if there’s any way to make my Macro compatible between the two or if I should use different files with different syntaxes for each operating system / calc App.

This is the Macro:

REM  *****  BASIC  *****


Sub DeleteEntireRow()
  Dim oActiveSheet as Object
  oActiveSheet = ThisComponent.getCurrentController.getActiveSheet()
  oActiveSheet.getRows.removeByIndex( 0, 1 )
  StoreCSV()
End Sub


sub StoreCSV()
   dim sURL As String
   dim document as object
   document = ThisComponent
   
sURL = ThisComponent.getURL()
sURL = sURL &"_"& s &".csv"
dim args(1) as new com.sun.star.beans.PropertyValue
   
   args(0).Name = "FilterName"
   args(0).Value = "Text - txt - csv (StarCalc)"
   args(1).Name = "FilterOptions"
   args(1).Value = "44,34,76,1"

   document.storeToURL(sURL,args)
end sub

MS Excel and LO Calc object models are different.
If * .ods document is opened in Excel, then all its macros (LO Basic) will be ignored.
If * .xlsm document is opened in Calc, then some macros (VBA) can be executed (it is desirable that the author knows in advance that her (his) macros will be executed under the control of Calc).
See Option VBASupport and further links for details.