Reputation: 24144
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);
}
Upvotes: 1
Views: 2596
Reputation: 395
you can try by using new Label() as follow
sheet.addCell(new Label(column, row, String))
Upvotes: 4