I am not really sure if this is possible but here it goes , I have written an excel macro and i am calling this macro through a vbs. Here is the snippet for the same.
Dim objExcel, objWorkbook, ad, FilePath
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
For Each ad In objExcel.AddIns
If ad.Name = "hello.xla" Then
FilePath = ad.Path & "\hello.xla"
Exit For
End If
Next
objExcel.Workbooks.Open (FilePath)
Set objWorkbook = objExcel.Workbooks.Open(WScript.Arguments(0))
objExcel.Run "Test"
objWorkbook.Close
objExcel.Quit
Set objWorkbook = Nothing
Set objExcel = Nothing
WScript.Echo "Finished."
WScript.Quit
I am able to do dis. Now i am calling this vb script using java Runtime.getRuntime().exec("cmd /c start calling.vbs");
So is it possible to run this excel macro on a linux server? I understand that we cannot call a vbs file on a linux box and also that opening and formatting the excel maybe not possible hence is there maybe a workaround or some other way to call it in linux machine maybe using an sh file ?