Okay so I want to right a piece of code that can help me accomplish the following task. I just want help on a pseudo code so I can start coding cause I have no idea how I am going to do this.
So what needs to be done is I need to create a line of flight using raw excel data. For example a flight takes off from MIA @ 9:59 arrives in ATL @ 12:00 now plane must sit at least 30 minutes on the ground before next flight. So now I have to look at the next flight that will be leaving from ATL which would be at say there are now flights leaving atl from 12:30 to 12:40 the next flight would be at 12:45 to SFO which will arrive at 18:08 in sfo. So this airplane made 2 legs, 1st leg to mia to atl and the 2nd leg would be atl to sfo. this is just the simple part but what if i want to determine
So I need to be able to go through all this data which looks like this Data. Be able to change make it look like this for each flight Like this
Any feedback would help greatly
I am trying to implement this in either java, php/sql with html page or just with macros in excel
Check out apache POI. As far as I know it was developed especially for reading Excel files. Plus it's also open source :).
Apache POI Link: Click here
Example:
InputStream inp = new FileInputStream("workbook.xls"); //InputStream inp = new FileInputStream("workbook.xlsx");
Workbook wb = WorkbookFactory.create(inp);
Sheet sheet = wb.getSheetAt(0);
Row row = sheet.getRow(2);
Cell cell = row.getCell(3);
if (cell == null)
cell = row.createCell(3);
cell.setCellType(CellType.STRING);
cell.setCellValue("a test");
// Write the output to a file
FileOutputStream fileOut = new FileOutputStream("workbook.xls");
wb.write(fileOut);
fileOut.close();