Ayza Ali Khan
Ayza Ali Khan

Reputation: 73

error in creating excel file

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

Upvotes: 0

Views: 325

Answers (1)

Jens
Jens

Reputation: 69440

You have to import Filewithout asterix:

import java.io.File; 

and remove import jxl.read.biff.File;

Upvotes: 1

Related Questions