public static void addToSheet (String input_file_name, String output_file_name) {

		// Picks 9 reference points which are along the boundary and the center. (need to know low_x, low_y, max_x, max_y)
		//double x_min = 317900;
		//double x_max = 317998;
		//double y_min = 4367500;
		//double y_max = 4367815;

		int rows;

		try {

			calculateReferencePoint(input_file_name);
			Workbook wrk1 =  Workbook.getWorkbook(new File(input_file_name));

			Sheet sheet1 = wrk1.getSheet(0);
			rows = sheet1.getRows();

			double [][] data = new double [rows][9]; //distance from reference 1,2,3,...,8,9

			for (int i = 1; i < rows; i++) {
				Cell time_cell = sheet1.getCell(0, i);
				Cell x_cell = sheet1.getCell(1, i);
				Cell y_cell = sheet1.getCell(2, i);

				String time_cell_string = time_cell.getContents();
				String x_cell_string = x_cell.getContents();
				String y_cell_string = y_cell.getContents();

				Double time_double = Double.parseDouble(time_cell_string);
				Double x_double = Double.parseDouble(x_cell_string);
				Double y_double = Double.parseDouble(y_cell_string);
				data[i][0] = distance(max_x, max_y, x_double, y_double); // (top left)

			}

			File exlFile = new File(output_file_name);
			WritableWorkbook writableWorkbook = Workbook.createWorkbook(exlFile);

			WritableSheet writableSheet = writableWorkbook.createSheet("4 Days", 0);

			Label ref1 = new Label (0, 0, "Top Left");

			writableSheet.addCell(ref1);

			for (int i = 1; i < rows/4; i++){
				Number value1 = new Number (0, i , data[i][0]);

				writableSheet.addCell(value1);
			}	


			int a = 1;
			for (int i = rows/4; i < rows/2; i++){
				Number value1 = new Number (1, a , data[i][0]);

				writableSheet.addCell(value1);
				a++;
			}

			a = 1;
			for (int i = rows/2; i < 3*rows/4; i++){
				Number value1 = new Number (2, a , data[i][0]);

				writableSheet.addCell(value1);
				a++;
			}

			a=1;
			for (int i = 3*rows/4; i < rows; i++){
				Number value1 = new Number (3, a , data[i][0]);

				writableSheet.addCell(value1);
				a++;
			}

			writableWorkbook.write();
			writableWorkbook.close();

		} catch (BiffException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}catch (Exception e) {
			e.printStackTrace();
		}
	}