EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB249970: How to execute URL API using MicroStrategy Web SDK


Community Admin

• Strategy


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); 
    } 
} 


Comment

0 comments

Details

Knowledge Article

Published:

June 22, 2017

Last Updated:

June 22, 2017