Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have cell objects that I am writing to from an array of information. What I am trying to do is have it that the program will handle any size of array so the cells are being filled in dynamically i guess the term would be.

I am also trying to add conditional formatting to these cells as they are being added in, but the CellRangeAddress seems to need a string of the exact cells being formatted with Excel style addresses (A1,B3,F6 etc).

I have looked at the API but cant seem to find anything that returns this kind of value.

How do I get the Excel address of a cell?

Thanks in advance and apologies if I have missed something completely obvious or if the question is unclear.

EDIT Derp. Found what I was looking for, figured I may as well show it:

CellRangeAddress range = new CellRangeAddress(c1.getRowIndex(),c3.getRowIndex(), c1.getColumnIndex(), c3.getColumnIndex());

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.