code: static IDataSet toDataSet(final IDataModel dataModel) {
          if (dataModel == null) { return null; }
          
          IDataSet dataSet = new DataSet(dataModel.getName());
          if (dataModel.rowCount() == 0) { return dataSet; }
  
          for (IDmRow dmRow : dataModel) {            
              IDsRow dsRow = dataSet.addRow();
              for (IDmCell dmCell : dmRow) {
                  IDsCell dsCell = dsRow.addCell(dmCell.getAddress().a1Address().column());
                  if (dmCell.getValue().isPresent()) {
                      dsCell.setValue(dmCell.getValue().get());
                  }
              }
          }
          
          return dataSet;
      }
docs: Converts an {@link IDataModel} to a new {@link IDataSet}.
  Ignores empty rows.
  Uses {@link IDmCell#getValue()} for {@link IDsCell} values.