+ union value *value = NULL;
+ int width;
+ bool ok;
+
+ g_return_val_if_fail (ds, FALSE);
+ g_return_val_if_fail (ds->datasheet, FALSE);
+
+ g_return_val_if_fail (idx < datasheet_get_column_cnt (ds->datasheet), FALSE);
+
+ width = fmt_var_width (fmt);
+ value = xmalloca (value_cnt_from_width (width) * sizeof *value);
+ ok = (datasheet_get_value (ds->datasheet, casenum, idx, value, width)
+ && data_in (input, LEGACY_NATIVE, fmt->type, 0, 0, 0, value, width)
+ && datasheet_put_value (ds->datasheet, casenum, idx, value, width));