1
votes

I use Java Smartsheet API.

According to Smartsheet documentation

"Formatting data can optionally be included for columns, rows, and cells by adding the “include=format” query string parameter to any API operation that returns any of those objects (for example, GET /sheets/{sheetId}, GET sheets/{sheetId}/rows/{rowId}, etc.). When this parameter is included, objects that contain non-default formatting will include a format property. Objects which do not have any non-default format settings applied will exclude this property."

I creates class SmartSheetTableModel with following constructor:

private SmartSheetTableModel(long sheetId, EnumSet<SheetInclusion> includes, EnumSet<ObjectExclusion> excludes, Set<Long> rowIds, Set<Integer> rowNumbers, Set<Long> columnIds, Integer pageSize, Integer page) throws SmartsheetException {
        this.sheet = smartsheet.getSmartsheet().sheetResources().getSheet(sheetId, includes, excludes, rowIds, rowNumbers, columnIds, pageSize, page);
    }

Here I call it with FORMAT param:

SmartSheetTableModel sheet = new SmartSheetTableModel.Builder(id).setIncludes(EnumSet.of(SheetInclusion.FORMAT, SheetInclusion.COLUMN_TYPE, SheetInclusion.FILTERS)).setRowNumbers(new HashSet<>(Arrays.asList(new Integer[] {1, 2}))).build();

Despite supplying FORMAT parameter, getFormat() calls on rows, columns and cells always returns null. In web sheet I see however that rows has different colors.

Any ideas?

1

1 Answers

1
votes

OK, I found that rows in Smartsheet may have conditional format.