Skip to main content

I have an excel file with 100 records (100 rows) with 5 columns. I have a process that will filter one record to update one column field called ‘Last Update’ in that particular record row. So The column ‘Last Update’ for that 1 record should be updated and the rest of the 99 records will remain the same. Keep in mind that the one record being updated, only one column is to be updated which is the Last Update column and the rest of the columns fields will remain the same. 

 

How can I configure the FeatureWriter?

I currently have the following set in the FeatureWriter Parameters and in the configuration but this does nothing. The excel sheet  looks the same as before with all 100 records the same and the one record that Im looking to update does not have the Last Update column updated. 

 

If I do an Insert, it updates that one record column ‘Last Update’ but the rest of the 99 records are deleted, which I don’t want. So the Insert is not working for my purpose.

Thank you. 

In Update Mode, the Writer “Row Number Attribute” needs to be set at the Row Number to start updating rows from.   From the screenshot above, instead currently this is set to the actual “Last Update” DateTime value to write.  Instead for the example above, this should be set as the row number = 4 from the sample worksheet shown.

 

An alternative to use in these scenarios is the read the entire worksheet, modify just the row(s) that need changing and then write all rows, both modified and unmodified back into the Worksheet with Insert Mode and Truncate Existing Sheet set to “Yes”.   This particularly gets around an Excel Writer limitation than in Update mode, it can only update from the Start Row Number and whatever next N features enter the Writer will similarly update all rows directly below this start row, which is undesirable if the worksheet is unordered and rows to update may not be adjacent to one another.


Reply