Import the Java. IO. FileInputStream;
Import the Java. IO. FileNotFoundException;
import java.io.IOException;
Import the Java. Text. DecimalFormat;
import java.text.SimpleDateFormat;
Import the Java. Util. LinkedList;
import java.util.List;
The import org, apache poi. HSSF. Usermodel. HSSFCell;
The import org, apache poi. HSSF. Usermodel. HSSFDateUtil;
The import org, apache poi. HSSF. Usermodel. HSSFRow;
The import org, apache poi. HSSF. Usermodel. HSSFSheet;
The import org, apache poi. HSSF. Usermodel. HSSFWorkbook;
The import org, apache poi. XSSF. Usermodel. XSSFCell;
The import org, apache poi. XSSF. Usermodel. XSSFRow;
The import org, apache poi. XSSF. Usermodel. XSSFSheet;
The import org, apache poi. XSSF. Usermodel. XSSFWorkbook;
Public class Excel {
Public static void main (String argv []) {
Try {
HSSFWorkbook wb=new HSSFWorkbook ();//create the Excel object
HSSFSheet sheet=wb. CreateSheet (" object statements ");//create a working form
HSSFRow row=sheet. CreateRow (0);
HSSFCell cell=row. CreateCell (0);
The Chinese "in the cell. SetCellValue (" cell);
//output file
FileOutputStream fileOut=new FileOutputStream (" e: \ \ workbook. XLS ");
Wb. Write (fileOut);
FileOut. Close ();
System. The out. Println (" ok ");
} the catch (Exception e) {
e.printStackTrace();
}
}
}
CodePudding user response:
The poi. Jar importCodePudding user response:
Tip is obvious, the package does not exist,,,CodePudding user response:
Solved? Excuse me, is my POI packages have been imported, compile time error, run to the package there is no