Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8163987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:12:05+00:00 2026-06-06T19:12:05+00:00

I have a List of String objects that are pipe delimited. something like this:

  • 0

I have a List of String objects that are pipe delimited. something like this:

String1|String2|String3
String4|String5|String6
...

Using Apache POI as excel library, is it possible to iterate over entire List writing out the string object as each row in the excel file? i.e. something like:

for (String inst : <List instance>)
       <sheetInstance>.write(inst)

i.e. output the string directly to the excel as a row entry rather than setting each cell value with a string i.e.

setting row 1, cell 1 = String1
setting row 1, cell 2 = String2
setting row 1, cell 3 = String3
setting row 2, cell 1 = String4 ...

Currently, it looks like I need to set individual cells to each value.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:12:06+00:00Added an answer on June 6, 2026 at 7:12 pm

    You need to split the String into an array in order to fill the cells, like this:

    for (short rowIndex = 0; rowIndex < stringList.length(); rowIndex++) {
        Row row = sheet.createRow(rowIndex);
        String[] cellValues = stringList.get(rowIndex).split("|");
        for (int colIndex = 0; colIndex < cellValues.length; colIndex++) {
            Cell cell = row.createCell(colIndex);
            cell.setCellValue(cellValues[colIndex]);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a list of objects that have coordinates. The object is something like
I have one List of objects that looks somthing like this class Item {
I have a list of objects (mainly int, string, double) And I would like
I have a list like this Dim emailList as new List(Of String) emailList.Add(one@domain.com) emailList.Add(two@domain.com)
I have method that parses a list of String records into objects and returns
I have a class that looks like this public class TestCase { public IEnumerable<string>
I have my class that is something like this: public class DBConection extends SimpleJdbcDaoSupport
I have a string and a list of objects: gpl = %(id)s : %(atr)s
I have a list of string values that I want add to a hashtable
I have a list of string like: s = [(abc,bcd,cde),(123,3r4,32f)] Now I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.