Downloading excel in 2010 instead of 2003 through webdynpro java application
Hi Experts,
We have developed a webdynpro java application where we are downloading an excel file through linktourl UI element. we are not using any external jars to create that excel and we used simple java.io API. When we run the application and trying to download the excel, by default it is asking us to save in 2003 instead of 2010. I came to know that it depends on the version of MS office available / installed in SAP portal server. Can somebody provide SAP official links to support this?
Thanks in advance,
Regards,
Pradeep
Hi Jun,
Thanks for your reply. We know by using Apache POI external jars we can achieve the functionality. But we don't want to do major changes to the existing application to just download the excel in 2010 format instead of 2003.
Is there any other way to do without using the external jars. I mean simple coding / configuration or any work around.
Regards,
Pradeep
Similar Messages
-
Validation of data fields in the Excel through webdynpro java
Hi all,
I have requirement as below:
There are data fields in the Excel File which are mandatory.When we are uploading the Excel file through webdynpro java it should validate the mandatory data fields are filled or not.Can anybody please send the required code or any related links.
Thanks,
Prakash.Hi Surya,
As per my info, you need to upload the file first then only web dynpro will be able to check for the mandatory fields.
Do this, while reading the buffer from the excel, just check the size of desired columns. Hope that will help.
Best Regards
Chander Kararia -
Help-how can i connect to the XE through my java application?
Hi, i am trying to connect to the XE through my java application. I have downloaded the jdbc driver tho. but the error occured: cant find the symbol (class oracledatasource not found) . could anyone here tell me what else should i try to fix it? where should i put the jdbc packages ? anyone's prompt reply would be much appreciated! thanks a lot.
Hi ,thank you very much for your guide.
i am actually trying to connect to the XE server through my JSP files.
i download the Oracle jdbc driver packages and put them in the same folder with JSP files. but i did not set the class path tho.
do i have to set the enviroment variables for the classpath of Oracledatasource class? thanks a lot.
another problem i got is installing the JDeveloper, it seemed my computer just got stuck there when installing JDeveloper. my laptop is with 256MB memory tho.
the code i used to connect to the XE server in my jsp file is as below:
<%@ page language="java" contentType="text/html"%>
<%@ page import="java.sql.*" %>
<%@ page import java.sql.Connection%>;
<%@page import java.sql.SQLException%>;
<%@page import oracle.jdbc.pool.OracleDataSource%>;
<%@ page import="java.io.*" %>
<% String jdbcUrl = "jdbc:oracle:thin:@localhost";
Connection conn;
OracleDataSource ds;
ds = new OracleDataSource();
ds.setURL(jdbcUrl);
conn = ds.getConnection(jdbcUrl);
%>
dose it have some problems there?
thanks a lot.
Message was edited by:
Novice -
We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader.
For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer.
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>".
Current Situation: The above command line parameter when executed is working as expected in a User's Workspace.
When executed in a command line on the Application Server, it is working as expected.
But, the same is not working while executing it from Deployed environment.
Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2.
Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.This is the Acrobat.com forum. Your question will have a much better chance being addressed in the Acrobat SDK forum.
-
We are trying to implement a process so that any document that needs to be printed through our Java application will be printed as PDF using Adobe Reader. For which, We created and execute the below command line to call Adobe Reader and print the PDF on a printer."C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /T "\\<Application Server>\Report\<TEST.PDF>" "<Printer Name>". Current Situation: The above command line parameter when executed is working as expected in a User's Workspace. When executed in a command line on the Application Server is working as expected. But, the same is not working while executing it from Deployed environment.Software being used: 1. Adobe 11.0 enterprise version. 2. Webshpere Application Server 8.5.5.2. Please let us know if there is a way to enable trace logs in Adobe Reader to further diagnose this issue.
This is the Acrobat.com forum. Your question will have a much better chance being addressed in the Acrobat SDK forum.
-
How to fetch all the portal groups into dropdown through webdynpro Java App
Hello All,
I have a requirement where I have to fetch all the groups available in user administrator in portal into a dropdown, so that the admin can select the group from the dropdown and after that when he executes a button u201CGet Detailsu201D he must be able to get the list of users who has been assigned that group .
I need to achieve this through WebDynpro Java.
Any pointers or documents on this is very very helpful.
Thanks,
Manasa.
Edited by: Manasa Boyapati on Sep 12, 2011 7:25 AMHi,
Can you try using the below code ?
IUser uid = UMFactory.getUserFactory().getUserByLogonID(Userid);
Iterator groups = uid.getParentGroups(false);
while (groups.hasNext())
String str_grpname = (String)groups.next();
IGroup Group = UMFactory.getGroupFactory().getGroup(str_grpname);
ary_groups.add(Group.getUniqueName());
Hope you can achieve you results by tweeking this..
Regards,
Vijay. -
XML output file in Excel 2007/2010 instead of Excel 97-2003
Dear All,
EBS: 12.1.3
Database: 11.1.0.7
OS: Oracle Linux 5.3
Concurrent request ouput is coming normally in excel and the output can only be saved in excel 97-2003
as Viewer option application/vnd.ms-excel is set for .xls.
Now we have requirement for output to be displayed in 2007 or 2010.
for 2007 or 2010 i have to set viewer option for .xlsx
Please suggest the solution.
Thanks is advance
Rgds,
AlibPlease also see old threads -- https://forums.oracle.com/forums/search.jspa?threadID=&q=xlsx&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Reading Excel sheet data in WebDynpro Java Application
Hi,
I need to read an excel file which is stored locally in my computer. How to use upload UI element (in WebDynpro Java) ?
After reading the excel file the data is displayed in table structure in WD Java application. After doing some calculations on click of generate excel button the table data is translated into excel sheet. How to achieve this?
Thanks,
AnmolHi,
Hope the below links helps...
Re: upload & download files
https://wiki.sdn.sap.com/wiki/display/WDJava/Uploading%20excel%20file%20using%20WebDynpro%20for%20Java
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID0729285250DB01215080400348251106End?blog=/pub/wlg/6603
Thanks,
Prakash -
How to create a word document or a pdf through webdynpro java
Hi All,
I have a requirement where in i need to create a word/pdf document with a certain template form.
When the user clicks on a button then the word document with a template should be created and saved in his/her desktop.
I need to know what is the procedure to create a document.
If anyone has worked on it then please help me out.
Thanks and Regards,
PradeepHi Pradeep,
For creating PDF documents in Webdynpro Java you can use "iText.jar" .
to know more about creating PDF using iText refer these links.
http://www.brothersoft.com/downloads/itext-jar.html
http://www.lowagie.com/iText/download.html
Regards
Sridhar -
Runtime Error during FileUpload to KM through webdynpro java
Hi All,
When i try to upload a file using webdynpro java. I was using referring this blog.
/people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis
But when i deploy my application, it throws me a runtime error
" java.lang.NoClassDefFoundError: com/sapportals/wcm/repository/IResourceContext".
I have given the sharing reference as "Portal:sap.com/com.sap.km.aaplication". in webdynpro reference. and have added all the required jar files. What else needs to be done for this. Can anyone please help me out in this issue?
Regards,
DivyaPlease notice that this is case sensative-
"PORTAL:sap.com/com.sap.km.application"
Edit - I also see that you have two a instead of two p - please check for spelling errors
Edited by: Aviad Levy on Feb 4, 2008 9:16 AM -
Retrieving cookies when logging into java forums through a java application
Hello --
I am currently working on a spider application that will have the ability to login to sites of interest and then begin crawling.
I thought an easy place to start would be to login to java forums. However, I have run into a bit of a snag with all of the cookies....
The following is the information that I am posting:
action = "login"
url = "http://forum.java.sun.com/index.jsp"
UserId // my username
Password // my password
Submit = "Log in"
AutoLogin = "1"
I am doing this using HttpURLConnection that was created using http://developer.java.sun.com/servlet/SessionServlet as the URL. Then I create an output stream etc:
OutputStream os = huc.getOutputStream();
os.write(sb.toString().getBytes("US-ASCII")); // where sb is a StringBuffer which contains the above information separated with &'s
os.close();
This is when I run into my problem...Next, I try to obtain the session cookies (using the same HttpURLConnection that I posted with) but I am not getting all of the cookies.
As a test, I set my browser to prompt for cookies and I found that when you submit your login information three cookies are set: JDC, JSessionId, and SessionCredentials. Then two more cookies are set JSessionId again and jiveUserLastVisited -- I think these cookies are actually set while getting the http://forum.java.sun.com/index.jsp page. Anyway the only cookies that I get through my program are JSessionId and jiveUserLastVisited.
So to remedy this I tried setting followRedirects to false on my HttpURLConnection (before I perform my post) and then I tried to get the Set-Cookie header immediately following my post. What I found was after calling getFieldHeader() my connection has changed -- when I do a getConnection on my HttpURLConnection the connection has changed to the second page (http://forum.java.sun.com/index.jsp) even with redirects set to false.
I guess my inexperience with web applications has caught up with me. Does anybody have any ideas?
Thanks,
LisaLisa
Did you get any reply on this ?? I am also writing a similar web crawler and i also ran into similar problems.
let me know if you found the solution. thanks.
-P -
How to access Portal Database ( ORACLE) through webdynpro java
Hello experts,
I want to <b>access portal database tables</b> ( WCR_USERSTAT,WCR_WEBCONTENTSTAT,WCR_USERFIRSTLOGON )<b> using</b> <b>webdynpro java</b> application/service . Our portal DB is Oracle , so please tail me some solution for this asap. I had tried using <u>Portal Activity Report</u> iViews but that no fulfill our requirment.
Regads,
Laxmi..Hi,
You can use the following link which will help you to resolve the problem:
/thread/100181 [original link is broken]
thanks & regards,
Manoj -
Re: Third Party software invocation through a Java Application
hi,
use the java.lang.Runtime.exec() to execute the command and pass as an arguement the necessary file that you wish to invoke.
eg
// for eg if filename extension is .pdf
String pdf = "C:\\Program Files\\Adobe\\Acrobat 4.0\\Reader\\AcroRd32.exe";
String [] cmd = {"start", pdf,"c:\\sample\\sample.pdf"} ;
Process process = Runtime.getRuntime().exec(cmd) ;now put that code in a if condition dependent on the type of file extension..
hope that helpzz
cheerz
ynkrishI wrote a sample program :
public class Trial {
public static void main(String[] args) {
try {
String pdf = "C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe";
String [] cmd = {"start", pdf,"c:\\test\\intro.pdf"} ;
Process process = Runtime.getRuntime().exec(cmd) ;
} catch (Exception ex) {
System.out.println("Exception caught " + ex);
ex.printStackTrace();
}// end catch()
}// end main()
}// end class
I am working on Windows 2000 and JDK1.3.1
The error i got is
Exception caught java.io.IOException: CreateProcess: start "C:\Program Files\Ado
be\Acrobat 5.0\Reader\AcroRd32.exe" c:\test\intro.pdf error=2
java.io.IOException: CreateProcess: start "C:\Program Files\Adobe\Acrobat 5.0\Re
ader\AcroRd32.exe" c:\test\intro.pdf error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at Trial.main(Trial.java:6)
Vijay Hegde -
Sorry if i sound foolish how to run an applet through a java application
I am into java from last one month ank keep on exploring it in the want to
recently i created a application cum applet in the same class like
applet is doing its own task and there is a main method in the code
that does entirly different task lets assume displaying *'s on the dos prompt the program is getting complied and belive it its running as desired
but the only problem that i m facing if i use appletviewer Myclass.java
only the appletprog is displayed
and if i run java Myclass than only dos task is done
may be it is sounding foolish for most of you but if i can get a way
which will help me in excecuting only one of it and both of them run succesfully
it tryied different ways to do it but was not succesful
please do not get irreated if its bizzered but if you really have a solution for it .i will appreciate it
thanking youYes you can run an Applet from an application. The magic bit is providing an AppletContext and AppletStub!
Here's how you start it:
wpa = new WayPointsApplet(this);
new AppletWrapper(wpa, 380, 320);Here's the class definition: (includes code for my application that can be ignored.
// Define a wrapper class for the applet
class AppletWrapper extends Frame implements AppletStub, AppletContext {
Applet applet;
// Constructor
AppletWrapper(Applet a, int x, int y) {
applet = a;
setTitle(a.getClass().getName());
setSize(x, y);
Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();
setLocation((ss.width-x)/2, (ss.height-y)/2);
add(a, "Center");
a.setStub(this);
// Trap window closing
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
// Test if Write left undone before exiting???
if(WayPoints.wpa != null) {
if(!WayPoints.wpa.okToExit())
return; // Ignore
applet.stop();
applet.destroy();
if(WayPoints.debug || WayPointDefs.plot_debug) {
SaveStdOutput.stop();
System.exit(0); // EXIT Program
}); // end WindowListener
a.init();
show();
a.start();
} // end constructor
// AppletStub methods
public boolean isActive() { return true; }
public URL getDocumentBase() { return null; }
public URL getCodeBase() {
return WayPoints.currDir;
public String getParameter(String name) {
if (name.equalsIgnoreCase("DEBUG")) {
if (WayPoints.debug)
return "YES";
else
return "NO";
if(name.equals("PLOTDEBUG"))
return (WayPointDefs.plot_debug ? "YES" : "NO");
if (name.equalsIgnoreCase("SERVER"))
return "NO";
return "";
public AppletContext getAppletContext() { return this; }
public void appletResize(int width, int height) {}
// AppletContext methods
public AudioClip getAudioClip(URL url) { return null; }
public Image getImage(URL url) { return null; }
public Applet getApplet(String name) { return null; }
public Enumeration getApplets() { return null; }
public void showDocument(URL url) {}
public void showDocument(URL url, String target) {}
public void showStatus(String status) {}
} // end class AppletWrapper -
Uploading and downloading files in webdynpro java
how to upload and download xl files in webdynpro java application .
Hi ,
Refer these links they maybe helpful to you
You can check this sampple example from SDN
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40db4a53-41a9-2910-d4a2-9c28283f6658
Uploading and Downloading Files In Web Dynpro Java
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/202a850a-58e0-2910-eeb3-bfc3e081257f
http://help.sap.com/saphelp_nw04/helpdata/en/43/85b27dc9af2679e10000000a1553f7/content.htm
Uploading and Downloading Files In Web Dynpro Tables
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f
Some more links regarding Uploading and DownLoading Files
Uploading and downloading files
Upload and Download file through RFC called by java
Regards,
Saleem
Maybe you are looking for
-
Using an External Hard Drive vs. a separate computer for music producing
Hi all. I have a dilemma. I'm currently using logic express to make my music and its installed on my 13 inch macbook pro that I bought last year. Granted, it works fine, however I am looking to upgrade to Logic Studio soon as well as purchase Spectra
-
I just got an iTouch and whenever I try to sync it to iTunes it keeps poping up with a message that says something like "cannot sync or read file". What should I do?
-
More problems with time capsule on lion
i have one problem: time machine icon on the desktop is still there after time machine finishes backups (this happens over 50% of the times a backup is made, so it happens several times for day...)... Also, lots of complains about time capsule takes
-
Adjusting Spacing Between Thumbnails
Minor but annoying problem here. I don't know what I did but somehow all my thumbnails are now spaced REALLY close together (like, 1/8 of an inch apart). They were not like this before. I've tried adjusting the slider at the bottom right hand corner
-
ORA-12560: TNS:protocol adapter error error while using BR*tools
Hi, I am trying to use BRtools to display instance status (option 6 within Instance Management menu). We are running on Oracle 10g and SAP 4.6c (BRtools version 7.0 patch 13). SAP is running on Windows 2003 cluster environment. I checked lsnrctl stat