public static void generateCsvFromList(String fileName, List<Object> elems, Integer rowElems)
			throws IOException {
		StringBuffer buffer = new StringBuffer();
		if (elems.isEmpty()) {
			createCsvFile(fileName, buffer.toString());
		} else {
			rowElems = rowElems == null ? 1 : rowElems < 1 ? 1 : rowElems;
			int elemIndex = 1;
			ListIterator<Object> it = elems.listIterator();
			while (it.hasNext()) {
				buffer.append(generateSingleElement(it.next()));
				if (elemIndex < rowElems && it.hasNext()) {
					buffer.append(singleElementSeparator);
					elemIndex++;
				} else if(it.hasNext()){
					buffer.append(newLineSeparator);
					elemIndex = 1;
				}
			}
		}
		
		createCsvFile(fileName, buffer.toString());
	}