docs: @SuppressWarnings({ "rawtypes", "unchecked" })
  	public ExcelWriter write(Iterable<?> data, Comparator<String> comparator) {
  		Assert.isFalse(this.isClosed, "ExcelWriter has been closed!");
  		boolean isFirstRow = true;
  		Map<?, ?> map;
  		for (Object obj : data) {
  			if (obj instanceof Map) {
  				map = new TreeMap<>(comparator);
  				map.putAll((Map) obj);
  			} else {
  				map = BeanUtil.beanToMap(obj, new TreeMap<String, Object>(comparator), false, false);
  			}
  			writeRow(map, isFirstRow);
  			if (isFirstRow) {
  				isFirstRow = false;
  			}
  		}
  		return this;
  	}