Skip to main content

Posts

How to Create Pivot Tables in Excel with Java

  When working with Excel data, raw information is usually stored as detailed records. For example, a sales worksheet may contain fields such as date, region, product, quantity, and sales amount. As the amount of data grows, analyzing the original table directly becomes less convenient. Excel Pivot Tables provide a simple way to summarize and analyze data from different perspectives, such as: Calculating sales amounts by region; Summarizing data by product category; Comparing values across different dimensions. If you need to generate analysis reports automatically in a Java application, you can create Pivot Tables programmatically instead of manually opening Excel and configuring them each time. This article explains how to create Excel Pivot Tables with Java and configure fields for data summarization. Preparing the Environment Create a Java project and add the Excel processing dependency through Maven. Add the following configuration to pom.xml : <repositories> <re...

How to Extract Images and Image Information from PDF in Java

  PDF files are widely used for storing reports, manuals, e-books, and other documents that combine text and visual content. Besides text, PDF documents often contain various image resources, including charts, diagrams, screenshots, scanned pages, and illustrations. When processing PDF files programmatically, extracting images is often only part of the requirement. In many cases, developers also need additional information about those images, such as: Which page contains the image How many images exist on each page The width and height of extracted images The relationship between extracted images and the original document This information is useful in scenarios such as document archiving, content analysis, and image resource management. This article explains how to extract images from PDF files and retrieve image-related information using Java. Preparing the Environment Create a Java project and add the PDF processing dependency through Maven. Add the following configuration to pom...