kz.greetgo.msoffice.xlsx.gen.MergeCells Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo.msoffice Show documentation
Show all versions of greetgo.msoffice Show documentation
greetgo library to generate or parse MS Office files
package kz.greetgo.msoffice.xlsx.gen;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
class MergeCells {
MergeCells() {}
private final List cells = new ArrayList();
public void print(PrintStream out) {
if (cells.size() == 0) return;
out.println("");
for (MergeCell cell : cells) {
cell.print(out);
}
out.println(" ");
}
public void addMerge(int rowFrom, int colFrom, int rowTo, int colTo) {
MergeCell x = new MergeCell();
x.colFrom = colFrom - 1;
x.colTo = colTo - 1;
x.rowFrom = rowFrom;
x.rowTo = rowTo;
cells.add(x);
}
}