Тёмный

SpringBoot Upload Excel and read as JSON 

Mickey Java
Подписаться 222
Просмотров 34 тыс.
50% 1

Uses Apache POI
Upload a Excel file and read it as JSON
github.com/mickey-java/excel-...

Опубликовано:

 

2 июл 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 72   
@mickeyjava1580
@mickeyjava1580 4 года назад
Responses may be delayed. Thanks for your support.
@leonardonam1
@leonardonam1 3 года назад
Thanks Mickey! You’ve saved my morning! It was very helpful your knowledge
@fishandfisherman
@fishandfisherman 4 года назад
Mickey, Oh my God, your video is so awesome, I was able to develop a complete processing system from Excel, Thank you and Keep up the good work!
@soumyakumarsahoo2042
@soumyakumarsahoo2042 4 года назад
Hey sharan i was just searching for it. Though I didn't follow it completely I heard your voice and some old memories came up. The way you typing java 8 code I am motivated now to read it...
@shaarg
@shaarg 4 года назад
😄 👌
@amarthyaseshu683
@amarthyaseshu683 2 года назад
CSV & Excel series both helpful. Thanks for sharing!
@abdullahjmi
@abdullahjmi 4 года назад
excellent post, helped a lot
@Engineerschoicetutor
@Engineerschoicetutor 3 года назад
In my case,the row datas are not well mapped..Means not properly mapped with the key..Why it is happening.
@poojamishra1810
@poojamishra1810 Год назад
How can we do if values are combination of int, string and list in excel sheet?
@adamabdullah6789
@adamabdullah6789 4 года назад
i have error like this "java.lang.ClassNotFoundException: org.apache.poi.xssf.usermodel.XSSFWorkbookFactory". i use apache poi version 4.1.1 . any suggestion ?
@ShahidKhan-tc3pu
@ShahidKhan-tc3pu 2 года назад
Hi @Mickey, How to handle a big excel file around 100MB? application is getting hanged for such case.. Please suggest
@malaouitaoufik9758
@malaouitaoufik9758 3 года назад
It's possible to show alerte if you have duplicate row id database
@ashishchoksi8501
@ashishchoksi8501 2 года назад
Is it possible to have ORM kind of thing with excel, like we do in Repository. can we write class like : @ExcelSheet("sheet-name") class Emp { @Cell("id") int id; @Cell("empName") String empName; }
@vaibhavvishal115
@vaibhavvishal115 3 года назад
waht are the version and names of the library downloaded in the start
@pushp3593
@pushp3593 Год назад
i think we need to remove the tempfile from server once data is uploaded. otherwise it will create huge number of files on multiple upload
@omkar.at.office
@omkar.at.office 6 лет назад
Awesome! 👍🏻
@mickeyjava1580
@mickeyjava1580 6 лет назад
Thanks :)
@mickeyjava1580
@mickeyjava1580 5 лет назад
github.com/mickey-java/excel-upload for source code. Excel file can be anywhere Keerthi
@shodhikagupta1447
@shodhikagupta1447 3 года назад
Hi Mickey, I'm getting this compilation error while returning from service class. Cannot infer type argument(s) for map(Function
@AnkitYadav-cw8oo
@AnkitYadav-cw8oo 2 года назад
make sure you are returning cellVal and not cellVals..I made this mistake
@vasupaladugu3383
@vasupaladugu3383 5 лет назад
i write code as it is .. but it's not working...basically post method not run at the time of Start Sprinboot Application...
@mickeyjava1580
@mickeyjava1580 5 лет назад
You have to use postman to call the post method.
@omniversal4739
@omniversal4739 4 года назад
Hi. How do I write an object to a text file and then have a method which is able to download it in a Spring Boot REST api?
@mickeyjava1580
@mickeyjava1580 4 года назад
Will cover it on next video. Thanks
@user-gy4he3hf4b
@user-gy4he3hf4b 2 года назад
@@mickeyjava1580 please, could you make a video .
@user-gy4he3hf4b
@user-gy4he3hf4b 2 года назад
@@mickeyjava1580 Hello! I really need your advice on writing an MVC application that can convert the file format. Could you help, please. Could you give me some tips, please
@TheAyushmaan8
@TheAyushmaan8 3 года назад
org.springframework.web.multipart.MultipartException: Current request is not a multipart request facing this error.. please help
@rajatagrawal141
@rajatagrawal141 5 лет назад
how to convert the database table into into pdf /word using spring boot
@mickeyjava1580
@mickeyjava1580 5 лет назад
Coming soon in next video!
@prasanthsainandyala4897
@prasanthsainandyala4897 5 лет назад
Hi Mickey, how to deal with empty cells in excel here?
@mickeyjava1580
@mickeyjava1580 4 года назад
Will try to cover it on next video. Thanks
@manikantatangudu2310
@manikantatangudu2310 5 лет назад
Hey Mickey, is something missing in code ? i tried to execute the code as is and am getting "Cannot get a NUMERIC value from a STRING cell" error with same sample file
@mickeyjava1580
@mickeyjava1580 5 лет назад
Converge streams, example: Map cellListMap = uploadUtil.getStream(row) .collect(Collectors.groupingBy(Cell::getCellType)); List cellList = Stream.of( cellListMap.get(CellType.NUMERIC).stream().map(Cell::getNumericCellValue), cellListMap.get(CellType.STRING).stream().map(Cell::getStringCellValue) ).collect(Collectors.toList()); but this may affect mapping it to the right header. Something to work on :)
@jeanlambertniyigaba439
@jeanlambertniyigaba439 4 года назад
@@mickeyjava1580 uploadUtil.getStream(row) it says row can not be resolved to a variable!! what is the real argument to be passed as a row? Cell::getCellType this getCellType is deprecated, in POI 3.15, getCellTypeEnum is deprecated too? what would you advise?
@manuchap5216
@manuchap5216 4 года назад
@@mickeyjava1580 I am getting same error "Cannot get a NUMERIC value from a STRING cell" error with same sample file, I tried your code of converge streams, but facing some issues with mapping as you mentioned in your above. can you suggest anything on it?
@dusmantakumarmahanta9890
@dusmantakumarmahanta9890 Месяц назад
Thanks for the video If in excel the value is empty how to read that as null ??
@pranavjadhav1987
@pranavjadhav1987 7 месяцев назад
Resolved [org.springframework.web.multipart.support.MissingServletRequestPartException: Required part 'file' is not present.] how to resolve this issue??
@dusmantakumarmahanta9890
@dusmantakumarmahanta9890 Месяц назад
Awesome video How read the save json and convert it to List ??
@ajjai9402
@ajjai9402 Год назад
How to learn Java 8 implementation. The way you were using. 👌
@Julguapo
@Julguapo 4 года назад
Hi Mickey i get this error Cannot infer type argument(s) for map(Function
@mickeyjava1580
@mickeyjava1580 4 года назад
Try using the same Type T in all places
@shodhikagupta1447
@shodhikagupta1447 3 года назад
Hi Mickey I'm getting the same error _. Have written the exact code from your repo. And used type T in allplaces
@shodhikagupta1447
@shodhikagupta1447 3 года назад
Hi Julio. Were you able to solve this issue?
@lovemakeslifelive8516
@lovemakeslifelive8516 4 месяца назад
Is this batch wise ?
@user-bv5uo7kn2u
@user-bv5uo7kn2u 5 месяцев назад
Hello, I'm getting internal server error
@dye8598
@dye8598 Год назад
I face issue if there's some class object in Excel
@dye8598
@dye8598 Год назад
How can we add class object in Excel? Like in this tutorial its assumed that it's always string but i want them as some object how can we do that?
@536_ravi2
@536_ravi2 2 года назад
Can i know how to connect with u
@raviteja-pt4yh
@raviteja-pt4yh 3 года назад
can you write a junit for this or any one here
@RiyaSharma-np6eo
@RiyaSharma-np6eo 3 года назад
I wished if you'd have explained it a bit more But still, thanks for the video.
@aldoomar2076
@aldoomar2076 3 года назад
Buen video, para aquellos que necesitan validar los tipos de datos de las columnas List cellList = uploadUtil.getStream(row).map(cell -> { String cellVal = ""; if (cell.getCellType().equals(CellType.STRING)) { cellVal = cell.getStringCellValue(); } else if (cell.getCellType().equals(CellType.NUMERIC)) { cellVal = String.valueOf(cell.getNumericCellValue()); if (DateUtil.isCellDateFormatted(cell)) { DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Date date = cell.getDateCellValue(); cellVal = df.format(date); } } return cellVal; }).collect(Collectors.toList());
@arthurdantas7819
@arthurdantas7819 2 года назад
it helped me!! 😁
@oscardacto8451
@oscardacto8451 Год назад
Me podrías explicar? gracias
@mypclover
@mypclover 5 лет назад
How to get both string and integer here
@shaarg
@shaarg 5 лет назад
You can use switch case or if else. switch (cell.getCellTypeEnum()) { case STRING: return cell.getStringCellValue(); case NUMERIC: return cell.getNumeric...;
@athiraigeetha9008
@athiraigeetha9008 5 лет назад
@@shaarg how to get string and integer using map(). Mickey Java used.map(cell::getstringcellvalue). It throws error cannot get a string from a numeric cell, when values like s.no is read. I have changed the cell format type to text. But no luck.
@mickeyjava1580
@mickeyjava1580 5 лет назад
Converge streams, example: Map cellListMap = uploadUtil.getStream(row) .collect(Collectors.groupingBy(Cell::getCellType)); List cellList = Stream.of( cellListMap.get(CellType.NUMERIC).stream().map(Cell::getNumericCellValue), cellListMap.get(CellType.STRING).stream().map(Cell::getStringCellValue) ).collect(Collectors.toList()); but this may affect mapping it to the right header. Something to work on :)
@priyadarshinisenapati8940
@priyadarshinisenapati8940 4 года назад
this code is not working ...please upload this project
@sonquach4417
@sonquach4417 4 года назад
hello Mickey Java u can do it with primefaces for me thanks u so much for all
@athiraigeetha9008
@athiraigeetha9008 5 лет назад
Nice and clean. Do you have the code in git? Please share.
@mickeyjava1580
@mickeyjava1580 5 лет назад
Thanks Geetha. github.com/mickey-java/excel-upload
@athiraigeetha9008
@athiraigeetha9008 5 лет назад
@@mickeyjava1580 thanks for the quick response
@giriprakashreddy8968
@giriprakashreddy8968 3 года назад
Share me the zip file
@joaovitoralveslima4186
@joaovitoralveslima4186 2 года назад
Play vídeo at 0.25 of speed z
Далее
How to Measure ANY Cliffs Height with a Rock
00:46
Просмотров 10 млн
Разбудили Любимой Песней 😂
00:14
How to read excel in Java
33:38
Просмотров 64 тыс.
Read Excel files with Java
5:49
Просмотров 54 тыс.
Read CSV with Java 8 and Apache Commons
14:38
Просмотров 10 тыс.
Import Excel File in Spring MVC and Spring Boot
22:29
File Upload and Download with Spring Boot - REST API
29:04