1

I was going through this article by which I can start writing to Microsoft Excel sheet. But it shows only how to write an Integer. In my case I need to write Strings to Excel Sheet. In that strings I have IP Address as well.

So below is the scenario in which it is failing because ipAddress is String with dots in between the number. And also I cannot convert that String to Integer because of dots in between the number so that is the reason I was looking for other alternative.

So is there any other alternative to Number class below which I can use for String?

addNumber(sheet, 0, j, ipAddress);


private void addNumber(WritableSheet sheet, int column, int row, Integer integer) throws WriteException,
        RowsExceededException {
    Number number;
    number = new Number(column, row, integer, times);
    sheet.addCell(number);
}

1 Answer 1

4

you can try by using new Label() as follow

sheet.addCell(new Label(column, row, String))

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.