Using the Strategy Web SDK 9.4.1 can be leveraged to execute exports to avoid the additional browser tab/window opened when exporting a report/document out of the box. The following snippet of code shows how to execute a URL (fast export/export) using java:
import java.net.*;
import java.nio.channels.Channels;
import java.nio.channels.ReadableByteChannel;
import java.io.*;
public class ExecuteExportJavaURLAPI {
public static void main(String[] args) throws Exception {
String source = "http://webserver/MicroStrategy/asp/Main.aspx?evt=3067&src=Main.aspx.3067&reportID=31805E97446799F853549F9B7E78ADDF&server=INTELLIGENCESERVER&Project=Strategy%20Tutorial&port=0&group=export&fastExport=true&reportViewMode=1&showOptionsPage=false&defaultRunMode=excelFormattingGridsIServer&uid=administrator&pwd=";
URL website = new URL(source);
ReadableByteChannel rbc = Channels.newChannel(website.openStream());
FileOutputStream fos = new FileOutputStream("\\\\was-psalazar\\shared\\PedroBeccaTest.xls");
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
}
}