cancel
Showing results for 
Search instead for 
Did you mean: 

Can't Add Import redline error

Former Member
0 Kudos

HI!,Everyone.

I want test transfer data to Excel.but when copy the code from this sap forum. appear some Error.

e.g.

public void onActionToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
	String fileName = "vishal" + ".xls";
	IWDCachedWebResource cachedExcelResource = null;
	try
	{   
		java.io.File f = new java.io.File("output.xls");
	    WritableWorkbook workbook = Workbook.createWorkbook(f);
               .........
	}
	catch(Exception ex)
	{
	}
  }

now have redline under WritableWorkbook & Workbook , I use click right----Add Import to sloved, but failed

can you help me ?

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Doke,

You need to add jxl.jar file to your library. So what you do is download the jxl.jar file in the below link and add your project at Go to project properties -> Java Build Path -> Libraries tab ->Click on "Add External JARs" button and add jxl.jar file and also you need to add that jar in the lib folder as Go to Navigator in webdynpro and add the jar file in the lib directory of that project.

[http://www.java2s.com/Code/Jar/Spring-Related/Downloadjxljar.htm]

Regards

Raghu

Former Member
0 Kudos

Hi,

It seems your corresponding JAR files are missing.

For that you need to add external jar files in your project:

Go to project properties -> Java Build Path -> Libraries tab ->Click on "Add External JARs" button and add corresponding .jar files.

In your case, you need to add jxl.jar or poi-2.0-final-20040126.jar

Thanks

Sandy

former_member192434
Active Contributor
0 Kudos

Hi Doke,

Import xlf.jar file into your java build path and lib folder of your application. and rebuild your application

It will solve the problem

Thanks

Anup

Edited by: Anup Bharti on Oct 14, 2008 6:37 AM

Former Member
0 Kudos

I think you are using jexcel api. Download the jar files corresponding to the API you are using and add it as a reference to the project where you have written the code.

Thanks,

GLM