Forum Discussion

darpan13's avatar
darpan13
Contributor
3 years ago

Insert Rows using Spread sheet

SOURCE: ONESTREAM CHAMPIONS

Hi Friends,

Did anyone try inserting rows into a custom table ( within one stream ) using Spread Sheet?

I am able to update the data into the custom table, but somehow the basic functions like insert didn’t work for me.

I need a similar function as per the screenshot for identifying the new records and the existing records.

 

Expectation%20in%20SS
Expectation in SS.png966×362 20.1 KB

 

Regards and Thanks

Darpan Bhansali

    • You need to create the spreadsheet rule that allows inserting. You can enable how many insert rows need to be provided as well. I use the status column feature to perform INSERT, UPDATE, and DELETE operations.

      • darpan13's avatar
        darpan13
        Contributor

        Hi Celvin, thanks… i can understand what you spoke above… but unable to write the code… if possible can you please share the code which you used.

        that will be of great help

        Regards

        Darpan Bhansali

    • Dominic_A's avatar
      Dominic_A
      Contributor

      Hi,
      do you have the “Table Views User Guide” available?
      On page 14 there is an example helper similar to his code:
      Dim tableView As New TableView()
      tableView.CanModifyData = True
      tableView.NumberOfEmptyRowsToAdd = 5
      tableView.EmptyRowsBackgroundColor = XFColors.LightGray
      The addition of tableview.EnableStatusColumn(True, statusColumnName, “DELETE,ARCHIVE, INACTIVE”) is described on the following pages of the same guide.
      The final area is where the operations could be set

      image
      image.png693×361 5.39 KB

       

      If the statusColumnName is not declared there is an automated/default naming of that column when left blank. “DELETE, ARCHIVE, INACTIVE” could show those choices in the drop down of the Spreadsheet Table View. A key requirement is to set ‘CanModifyData’ to True.

      For the exact code combination that needs to be associated with status in your case, I will leave this question to your service providers