cancel
Showing results for 
Search instead for 
Did you mean: 

Export Table UI to Excel File

Rodrigo-Giner
Active Contributor
0 Kudos

I have seen some tutorials on the forum but all that I find is more complex that what I really need.

I only want to export a table UI to a .xls file with browsing file (to choose where I wanna save the Excel file in the client).

I really have to use XML ? because I have seen this "Exporting Context Data into

Excel Using the Web Dynpro

Binary Cache" and I think that for what I want this is to complex. besides I followed the tutorial but dont know why I cant found java.util.map type.

I was thinking in using FileDownload, I know that I have to create a Attribute in the context of type Binary and link to the FileDownload element, but I dont know of to bind the Table data to that Attribute.

So any1 can explain me to easiest way to just save a .xls being able to choose where the file is gonna be saved.

Thx

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member182374
Active Contributor
0 Kudos

Hi,

You can read this Weblog by Bharathwaj R.

Weblog:

/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities

Omri

Rodrigo-Giner
Active Contributor
0 Kudos

Hi omri,I founded that weblog but I wasn't able to import that "TableUtilities.java" file, I put it in a packages folder but dont know why the proyect doesnt import it.

Valery, u have some .zip of example done for "Exporting Context Data into Excel Using the Web Dynpro Binary Cache" tutorial,cause I cant keep the track of it,the tutorial skips severals "easy" steps but Im a beginner in all this webdynpro/java universe and without those "easy" steps im lost.

Rodrigo-Giner
Active Contributor
0 Kudos

Valery u said that POI or XML are the options that I have , what about Office integration I can't use it ?

former_member182374
Active Contributor
0 Kudos

Hi Rodrigo,

After you copy the file to correct place make sure that you see it in the project's hierarchy:

Select Navigator tab in the Navigator view.

Then, right click on project's name and refresh it.

Now you should see the file.

Also, you proably need to change the package name so it will be match to your folder's hierarchy.

For example: you put the file in src\packages\com\myClass

then the package's name supposed to be com.myClass.

Hope it helps,

Omri

Former Member
0 Kudos

Rodrigo,

If you are talking about WD Office controls, then this is not an option here. Yes, IWDOfficeControl is able to display Excel file content, however, saving this files assumes mandatory user interaction (clicking "Save" button), and, afterward, "Save" event must be handled at server side in the very same manner as... right, as without IWOfficeControl.

VS

Rodrigo-Giner
Active Contributor
0 Kudos

Hi Omni.

I imported the file, thx but the problems is that I get a error in one of the imports, and all the places where there is a reference to that name.

import com.sap.tc.webdynpro.progmodel.api.IWDCalculatedAttributeAccessor;

did u manage to get that weblog working ?

Former Member
0 Kudos

com.sap.tc.webdynpro.progmodel.api.IWDCalculatedAttributeAccessor

available only since SP15

VS

Rodrigo-Giner
Active Contributor
0 Kudos

Thx Valery

I will go for the XML and bynary cache trying to follow the tutorial. If I get stuck I will let u all know.

Former Member
0 Kudos

Rodrigo,

The tutorial you mentioned (I guess it is <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/1208c2cd-0401-0010-4ab6-f4736074acc6">excel Export Using the Web Dynpro Binary Cache (34)</a>) provides the simplest possible way. If you think that XML is complex, then search SDN for alternative Apache Jakarta POI solution -- and you'll see what "complex" realy means

And there are only 2 options: XML and POI.

<i>besides I followed the tutorial but dont know why I cant found java.util.map type</i>

Actually, type name is java.util.Map (java is case-sensitive), and this type is available always (with any Java Runtime Environment version, without any additional libraries).

<i>I was thinking in using FileDownload, I know that I have to create a Attribute in the context of type Binary and link to the FileDownload element, but I dont know of to bind the Table data to that Attribute</i>

Hmmm... this aspect <i>is</i> covered by tutorial...

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com