java.io.FileNotFoundException“访问被拒绝”

时间:2018-12-17 09:35:28

标签: java exception apache-poi filenotfoundexception

我有以下代码:

  url:  https://_my_url

  method: GET

  validate_certs: no

  tags: copy_source_code

当我尝试保存文件时,出现以下错误

XSSFWorkbook wb = new XSSFWorkbook(new FileInputStream(
        "C:/Users/SW-FRMV-268347L/OUTPUTADDONGROSSPRICE.xlsx"));
FileOutputStream fileOut = new FileOutputStream("C:/Users/SW-FRMV-268347L/new.xlsx");

XSSFSheet sheet1 = wb.getSheet("Options CD DPV");
XSSFRow row = sheet1.getRow(2);
XSSFCell cell = row.getCell(2);

cell.setCellValue("Bharthan");
wb.write(fileOut);
fileOut.close();

注意:我正在使用Exception in thread "main" java.io.FileNotFoundException: C:\Users\SW-FRMV-268347L\new.xlsx (Access is denied)

0 个答案:

没有答案
相关问题