Skip to content

Commit

Permalink
fix windows path issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ivy-rew committed Oct 31, 2023
1 parent bf7d76d commit b11450d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,13 @@ public void run(IProgressMonitor monitor) throws InvocationTargetException {
}

private void importExcel(IProjectDataClassManager manager, FileResource excel, IProgressMonitor monitor) throws IOException {
String entityName = StringUtils.substringBeforeLast(excel.name(), ".");
String fileName = excel.path().lastSegment();
String entityName = StringUtils.substringBeforeLast(fileName, ".");
entityName = StringUtils.capitalize(entityName);

Workbook wb = null;
try(InputStream is = excel.read().inputStream()) {
wb = ExcelLoader.load(excel.name(), excel.read().inputStream());
wb = ExcelLoader.load(fileName, excel.read().inputStream());
}
Sheet sheet = wb.getSheetAt(0);

Expand Down

0 comments on commit b11450d

Please sign in to comment.