0
import java.io.File.*; 
import java.util.Date; 
import jxl.*; 
import jxl.read.biff.File;
import jxl.write.*;
public class Excela {
    public static void main(String[] args) {
        WritableWorkbook workbook = Workbook.createWorkbook(new File("output.xls"));
        
    }
}

i run this code in but it gives following error

Multiple markers at this line

- The method createWorkbook(File) in the type Workbook is not applicable for the arguments (File)

- The constructor File(String) is undefined

1 Answer 1

1

You have to import Filewithout asterix:

import java.io.File; 

and remove import jxl.read.biff.File;

Sign up to request clarification or add additional context in comments.

4 Comments

i do it but it still gives error Multiple markers at this line - Unhandled exception type IOException - Line breakpoint:Excela [line: 8] - main (String[])
@AyzaAliKhan Add a try catch block arround the line.
i am running it in ecclipse it should be created i thought or i have to give the destination address of a file ?
@AyzaAliKhan Sorry can't get you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.