title: Illegal base64 character 7b
body: <p>Im trying to decode a base64 string in order to generate an excel file</p>
  
  <p>Im using the base64 decode method for the above stated purpose</p>
  
  <pre><code>public Response addToDB(String base64){
  
      try{
          s=sf.openSession();
          tx=s.beginTransaction();
          /*FileInputStream file = new FileInputStream(new File("C:/Users/Ayesha.Syed/Desktop/eclipse_neon/students.xlsx")); 
          XSSFWorkbook workbook = new XSSFWorkbook(file); */
          byte[] decodedString = Base64.getDecoder().decode(base64);
          ByteArrayInputStream st = new ByteArrayInputStream(decodedString);
          XSSFWorkbook workbook = new XSSFWorkbook(st); 
          XSSFSheet sheet = workbook.getSheetAt(0);
          /*int starRow = sheet.getFirstRowNum();*/
          /*int endRow = sheet.getLastRowNum();*/
  
          XSSFRow row;
  
          for (int i = 1; i &lt;= sheet.getLastRowNum(); i++) {
  
              //points to the starting of excel i.e excel first row
  
              Student stud=new Student();
              row = sheet.getRow(i);
              stud.setRollnumber(row.getCell(0).toString());
              System.out.println(row.getCell(0).getCellTypeEnum());
  
              stud.setName(row.getCell(1).toString());
              System.out.println(row.getCell(1).getCellTypeEnum());
  
              stud.setEnglish(row.getCell(2).toString());
              System.out.println(row.getCell(2).getCellTypeEnum());
  
              stud.setHindi(row.getCell(3).toString());
              System.out.println(row.getCell(3).getCellTypeEnum());
  
              stud.setMaths(row.getCell(4).toString());
              System.out.println(row.getCell(4).getCellTypeEnum());
  
              stud.setMarks(  row.getCell(5).toString());
              System.out.println(row.getCell(5).getCellTypeEnum());
  
              stud.setPercentage(row.getCell(6).toString());
              System.out.println(row.getCell(6).getCellTypeEnum());
  
              s.save(stud);
          }
          response.setStatus("200");
          response.setMessage("succesfull");
          tx.commit();
      } catch (Exception e) {
          System.err.println("Exception : " + e.getMessage());
  
          response.setStatus("500");
          response.setMessage("unsuccesfull");
          tx.rollback();
  
      } finally {
          s.close();
      }
      return response;
  }
  </code></pre>
  
  <p>It is suppose to decode the string and generate an excel sheet along with the data i push through postman</p>