{"id":79146,"date":"2020-06-20T09:00:32","date_gmt":"2020-06-20T03:30:32","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=79146"},"modified":"2020-06-20T09:00:32","modified_gmt":"2020-06-20T03:30:32","slug":"read-write-excel-file-in-java","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/","title":{"rendered":"How to Read Excel File in Java Using POI"},"content":{"rendered":"<p>In this <strong>TechVidvan Java Tutorial<\/strong>, we are going to learn how we can <strong>read excel file in java<\/strong>. In Java, reading excel files is not similar to reading word files because of cells in excel files.<\/p>\n<p>JDK does not provide a direct API to read or write Microsoft Excel or Word documents. We have to rely on the third-party library that is Apache POI. In this article, we will learn how to create and write to an excel file using Apache POI.<\/p>\n<h3>Reading and writing Excel Files in Java<\/h3>\n<p>The people all over the world use excel files (spreadsheets) for various tasks related to organization, analysis, and storage of tabular data. Since these excel files are so common, the developers often face some use-cases when we need to read data from an excel file or generate a report in excel format.<\/p>\n<p>Apache POI (Poor Obfuscation Implementation) is a Java API for reading and writing Microsoft Documents in both formats .xls and .xlsx. It contains classes and interfaces.<\/p>\n<h3>Apache POI Library<\/h3>\n<p>The Apache POI library provides two implementations for reading excel files:<\/p>\n<h4>1. HSSF (Horrible SpreadSheet Format) Implementation<\/h4>\n<p>It denotes an API that is working with Excel 2003 or earlier versions. There are interfaces of HSSF implementations which are HSSFWorkbook, HSSFSheet, HSSFRow, and HSSFCell. We use these interfaces work with excel files of the older binary file format &#8211; .xls<\/p>\n<h4>2. XSSF (XML SpreadSheet Format) Implementation<\/h4>\n<p>It denotes an API that is working with Excel 2007 or later versions. We can use the XSSF implementation to work with the newer XML based file format &#8211; .xlsx.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/Apache-POI-Library.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79159\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/Apache-POI-Library.jpg\" alt=\"Apache POI Library in java\" width=\"656\" height=\"626\" \/><\/a><\/p>\n<h3>Interfaces and Classes in Apache POI<\/h3>\n<p>Below are various interfaces in POI:<\/p>\n<p><strong>1. Workbook:<\/strong> It represents an <strong>Excel Workbook<\/strong>. It is an interface implemented by HSSFWorkbook and <strong>XSSFWorkbook.<\/strong><\/p>\n<p><strong>2. Sheet:<\/strong> It is an interface that represents an <strong>Excel worksheet<\/strong>. A sheet is a central structure of a workbook, which represents a grid of cells. The Sheet interface extends j<strong>ava.lang.Iterable.<\/strong><\/p>\n<p><strong>3. Row:<\/strong> It is also an interface that represents the row of the spreadsheet. The Row interface extends <strong>java.lang.Iterable<\/strong>. There are two concrete classes: <strong>HSSFRow<\/strong> and <strong>XSSFRow<\/strong>.<\/p>\n<p><strong>4. Cell:<\/strong> It is an interface. It is a high-level representation of a cell in a row of the spreadsheet. <strong>HSSFCell<\/strong> and <strong>XSSFCell<\/strong> implement the Cell interface<\/p>\n<h3>Steps to Read Data from XLS file<\/h3>\n<p><strong>1.<\/strong>\u00a0Create a simple Java project in eclipse.<\/p>\n<p><strong>2.<\/strong>\u00a0Now, create a lib folder in the project.<\/p>\n<p><strong>3.<\/strong>\u00a0Download and add the following jar files in the lib folder:<\/p>\n<ul>\n<li>commons-collections4-4.1.jar Click Here<\/li>\n<li>poi-3.17.jar Click Here<\/li>\n<li>poi-ooxml-3.17.jar Click Here<\/li>\n<li>poi-ooxml-schemas-3.17.jar Click Here<\/li>\n<li>xmlbeans-2.6.0.jar Click Here<\/li>\n<\/ul>\n<p><strong>4.<\/strong>\u00a0Set the Class-Path:<\/p>\n<p>Right-click on the project -&gt;Build Path -&gt;Add External JARs -&gt; select all the above jar files -&gt; Apply and close.<\/p>\n<p><strong>5.<\/strong>\u00a0Now create a class file with the name <strong>ReadExcelFileDemo<\/strong> and write the following code in the file.<\/p>\n<p><strong>6.<\/strong>\u00a0Create an excel file with the name &#8220;employee.xls&#8221; and write some data into it.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79160\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-16.png\" alt=\"Create Excel\" width=\"489\" height=\"120\" \/><\/a><\/p>\n<h4>Code to read excel file<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import org.apache.poi.hssf.usermodel.HSSFSheet;\nimport org.apache.poi.hssf.usermodel.HSSFWorkbook;\nimport org.apache.poi.ss.usermodel.Cell;\nimport org.apache.poi.ss.usermodel.FormulaEvaluator;\nimport org.apache.poi.ss.usermodel.Row;\npublic class ReadExcelFileDemo {\n  public static void main(String args[]) throws IOException {\n    \/\/obtaining input bytes from a file  \n    FileInputStream fis = new FileInputStream(new File(\"C:\\\\mysheets\\\\employee.xls\"));\n    \/\/creating workbook instance that refers to .xls file  \n    HSSFWorkbook wb = new HSSFWorkbook(fis);\n    \/\/creating a Sheet object to retrieve the object  \n    HSSFSheet sheet = wb.getSheetAt(0);\n    \/\/evaluating cell type   \n    FormulaEvaluator formulaEvaluator = wb.getCreationHelper().createFormulaEvaluator();\n    System.out.println(\u201cThe given file is\u201d);\n    for (Row row: sheet)\n    \/\/iteration over row using for each loop  \n    {\n      for (Cell cell: row) \/\/iteration over cell using for each loop  \n      {\n        switch (formulaEvaluator.evaluateInCell(cell).getCellType()) {\n        case Cell.CELL_TYPE_NUMERIC:\n          \/\/field that represents numeric cell type  \n          \/\/getting the value of the cell as a number  \n          System.out.print(cell.getNumericCellValue() + \"\\t\\t\");\n          break;\n        case Cell.CELL_TYPE_STRING:\n          \/\/field that represents string cell type  \n          \/\/getting the value of the cell as a string  \n          System.out.print(cell.getStringCellValue() + \"\\t\\t\");\n          break;\n        }\n      }\n      System.out.println();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79161\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-1-1.png\" alt=\"Open Excel File\" width=\"522\" height=\"134\" \/><\/a><\/p>\n<h4>Code to read .xlsx file<\/h4>\n<p>The xlsx file is same as xls file and looks like:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79162\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-2-1.png\" alt=\"reading Excel file \" width=\"489\" height=\"147\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io.File;\nimport java.io.FileInputStream;\nimport java.util.Iterator;\nimport org.apache.poi.ss.usermodel.Cell;\nimport org.apache.poi.ss.usermodel.Row;\nimport org.apache.poi.xssf.usermodel.XSSFSheet;\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\npublic class XLSXReaderExample {\n  public static void main(String[] args) {\n    try {\n      File file = new File(\"C:\\\\mysheets\\\\student.xlsx\");\n      \/\/creating a new file instance  \n      FileInputStream fis = new FileInputStream(file);\n      \/\/obtaining bytes from the file  \n      \/\/creating Workbook instance that refers to .xlsx file  \n      XSSFWorkbook wb = new XSSFWorkbook(fis);\n      XSSFSheet sheet = wb.getSheetAt(0);\n      \/\/creating a Sheet object to retrieve object  \n      Iterator &lt; Row &gt; itr = sheet.iterator();\n      \/\/iterating over excel file\n      System.out.println(\u201cThe given file is\u201d);\n      while (itr.hasNext()) {\n        Row row = itr.next();\n        Iterator &lt; Cell &gt; cellIterator = row.cellIterator();\n        \/\/iterating over each column  \n        while (cellIterator.hasNext()) {\n          Cell cell = cellIterator.next();\n          switch (cell.getCellType()) {\n          case Cell.CELL_TYPE_STRING:\n            \/\/field that represents string cell type  \n            System.out.print(cell.getStringCellValue() + \"\\t\\t\\t\");\n            break;\n          case Cell.CELL_TYPE_NUMERIC:\n            \/\/field that represents number cell type  \n            System.out.print(cell.getNumericCellValue() + \"\\t\\t\\t\");\n            break;\n          default:\n          }\n        }\n        System.out.println(\"\");\n      }\n    }\n    catch(Exception e) {\n      e.printStackTrace();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-3-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79163\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-3-1.png\" alt=\"\" width=\"320\" height=\"142\" \/><\/a><\/p>\n<h3>Reading a particular cell value from an excel file (.xlsx)<\/h3>\n<p><strong>Table: EmployeeData.xlsx<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-4-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79164\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-4-1.png\" alt=\"Read cell from excel file\" width=\"623\" height=\"147\" \/><\/a><\/p>\n<p><strong>Example<\/strong><\/p>\n<p>In the following example, we read the value of the 2nd row and the 2nd column. The row and column counting start from 0. So the program returns &#8220;John\u201d.<\/p>\n<h4>Code to read a particular cell from an excel file<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">\/\/reading value of a particular cell  \nimport java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport org.apache.poi.ss.usermodel.Cell;\nimport org.apache.poi.ss.usermodel. * ;\nimport org.apache.poi.ss.usermodel.Sheet;\nimport org.apache.poi.ss.usermodel.Workbook;\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\npublic class ReadCellExample {\n  public static void main(String[] args) {\n    ReadCellExample rc = new ReadCellExample(); \/\/object of the class  \n    \/\/reading the value of 2nd row and 2nd column  \n    String vOutput = rc.ReadCellData(2, 2);\n    System.out.println(vOutput);\n  }\n  \/\/method defined for reading a cell  \n  public String ReadCellData(int vRow, int vColumn) {\n    String value = null; \/\/variable for storing the cell value  \n    Workbook wbook = null; \/\/initialize Workbook null  \n    try {\n      \/\/reading data from a file in the form of bytes  \n      FileInputStream fis = FileInputStream(\"C:\\\\mysheets\\\\EmployeeData.xlsx\");\n      \/\/creates an XSSFWorkbook object by buffering the whole stream into the memory  \n      wbook = new XSSFWorkbook(fis);\n    }\n    catch(FileNotFoundException e) {\n      e.printStackTrace();\n    }\n    catch(IOException e1) {\n      e1.printStackTrace();\n    }\n    Sheet sheet = wbook.getSheetAt(0);\n    \/\/getting the XSSFSheet object at given index  \n    Row row = sheet.getRow(vRow);\n    \/\/returns the logical row  \n    Cell cell = row.getCell(vColumn);\n    \/\/getting the cell representing the given column  \n    value = cell.getStringCellValue();\n    \/\/getting cell value  \n    return value;\n    \/\/returns the cell value  \n  }\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nJohn<\/p>\n<h3>How to Write Excel File in Java<\/h3>\n<p>Writing excel using POI is very simple and involves the following steps:<\/p>\n<p><strong>1.<\/strong> Create a workbook<br \/>\n<strong>2.<\/strong> Create a sheet in a workbook<br \/>\n<strong>3.<\/strong> Create a row in a sheet<br \/>\n<strong>4.<\/strong> Add cells in a sheet<br \/>\n<strong>5.<\/strong> Now, repeat the steps 3 and 4 to add more data<\/p>\n<h4>Code to write excel file in Java using POI<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">import java.io.FileInputStream;\nimport java.io.FileNotFoundException;\nimport java.io.IOException;\nimport org.apache.poi.ss.usermodel.Cell;\nimport org.apache.poi.ss.usermodel. * ;\nimport org.apache.poi.ss.usermodel.Sheet;\nimport org.apache.poi.ss.usermodel.Workbook;\nimport org.apache.poi.xssf.usermodel.XSSFWorkbook;\n\npublic class WriteExcelDemo {\n  public static void main(String[] args) {\n    \/\/Blank workbook\n    XSSFWorkbook workbook = new XSSFWorkbook();\n\n    \/\/Create a blank sheet\n    XSSFSheet sheet = workbook.createSheet(\"Product data\");\n\n    \/\/This data needs to be written (Object[])\n    Map &lt; String,\n    Object[] &gt; data = new TreeMap &lt; String,\n    Object[] &gt; ();\n    data.put(\"1\", new Object[] {\n      \"ID\",\n      \"NAME\",\n      \"PRICE\"\n    });\n    data.put(\"2\", new Object[] {\n      1,\n      \"Mouse\",\n      1000\n    });\n    data.put(\"3\", new Object[] {\n      2,\n      \"Keyboard\",\n      1200\n    });\n\n    \/\/Iterate over data and write to sheet\n    Set &lt; String &gt; keyset = data.keySet();\n    int rownum = 0;\n    for (String key: keyset) {\n      Row row = sheet.createRow(rownum++);\n      Object[] objArr = data.get(key);\n      int cellnum = 0;\n      for (Object obj: objArr) {\n        Cell cell = row.createCell(cellnum++);\n        if (obj instanceof String) cell.setCellValue((String) obj);\n        else if (obj instanceof Integer) cell.setCellValue((Integer) obj);\n      }\n    }\n    try {\n      \/\/Write the workbook in file system\n      FileOutputStream out = new FileOutputStream(new File(\"Product.xlsx\"));\n      workbook.write(out);\n      out.close();\n      System.out.println(\"howtodoinjava_demo.xlsx written successfully on disk.\");\n    }\n    catch(Exception e) {\n      e.printStackTrace();\n    }\n  }\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-5-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-79165\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2020\/06\/image-5-1.png\" alt=\"\" width=\"396\" height=\"87\" \/><\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>In this article, we learned how to read and write an excel file in Java using the program. There is a library called Apache POI which has many classes and methods that help us to deal with excel files in Java.<\/p>\n<p>We studied how to read a xls file and a xlsx file and how to write an excel file. We can also access a particular cell of an excel file.<\/p>\n<p><strong>Do share feedback in the comment section if you liked the article.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this TechVidvan Java Tutorial, we are going to learn how we can read excel file in java. In Java, reading excel files is not similar to reading word files because of cells in&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":79158,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[183],"tags":[2899,2900,2901,2902,2903],"class_list":["post-79146","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-java-read-excel","tag-read-and-write-excel-file-in-java","tag-read-data-from-excel-in-java","tag-read-excel-file-in-java","tag-reading-excel-file-in-java-using-poi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Read Excel File in Java Using POI - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn how to read and Write excel file in java using POI with Example and code. What is Apache POI Library, its interfaces and classes.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Read Excel File in Java Using POI - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn how to read and Write excel file in java using POI with Example and code. What is Apache POI Library, its interfaces and classes.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-20T03:30:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Read Excel File in Java Using POI - TechVidvan","description":"Learn how to read and Write excel file in java using POI with Example and code. What is Apache POI Library, its interfaces and classes.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/","og_locale":"en_US","og_type":"article","og_title":"How to Read Excel File in Java Using POI - TechVidvan","og_description":"Learn how to read and Write excel file in java using POI with Example and code. What is Apache POI Library, its interfaces and classes.","og_url":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2020-06-20T03:30:32+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"How to Read Excel File in Java Using POI","datePublished":"2020-06-20T03:30:32+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/"},"wordCount":717,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg","keywords":["java read excel","read and write excel file in java","read data from excel in java","Read Excel File in Java","reading excel file in java using poi"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/","url":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/","name":"How to Read Excel File in Java Using POI - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg","datePublished":"2020-06-20T03:30:32+00:00","description":"Learn how to read and Write excel file in java using POI with Example and code. What is Apache POI Library, its interfaces and classes.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2020\/06\/Read-Write-excel-files-in-java.jpg","width":802,"height":420,"caption":"Read & write excel file in java"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/read-write-excel-file-in-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"How to Read Excel File in Java Using POI"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=79146"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/79146\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/79158"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=79146"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=79146"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=79146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}