SpringBoot new annotation

2023-01-11   ES  

A few days ago I wrote a small program, read the data in Excel, and chose JXL.JAR at first, but JXL can only read the data of .xls. The data in .xls was relatively small. By 256, the demand for some big data cannot be met, so you need to read the .xlsx file, so I chose to implement it. These jar packages (have been pasted below) need no one.

public class Caculat {

* @param args

public static void main(String[] args) throws Exception {

try {

XSSFWorkbook workbook = new XSSFWorkbook(new FileInputStream(“F:/11.xlsx”));
XSSFSheet sheet = workbook.getSheetAt(0);
int RSROWS = Sheet.getPhysicalNumberofrows (); //
xssfrow hssfrow = sheet.getRow (0); // get a line, and then get the number of columns in the next step
int RSColumns = hssfrow.getphysicalNumberofells (); // column
for (int i = 0; i < rsRows; i++) 

for (int j = 0; j < rsColumns; j++) 

xssfcell C1 = Sheet.getRow (i) .getcell (j); // Get the No. j column j of line i
double p = c1.getNumericCellValue();
} catch (Exception e) {

throw new RuntimeException(e);




I read the data, so the format is numbers, so the data is not specially processed! There is no problem with the above procedures! Here I have uploaded the bag I used, and you need to download it here! If there is something wrong, please coach!


Related Posts

docker builds mysql container and provides service buynow

Runtime’s essence (3) —- objcmsgsend The method call in

[BZOJ 1657] [USACO2006 Mar] Moooo’s singing

[Independent development of a 2.5D game] – 2.5D perspective construction

SpringBoot new annotation

Random Posts

mqtt implementation data receiving

FAKEUSERAGENT module use and network chief solution Jason

Python tidy applet that is easy to make people have no friends, it is purely entertaining

Used diagram, time -order diagram, class diagram

[Event processing] The content of the text box implemented by js changes immediately to trigger the event simply introducing the STU