Saving Formulas and Comments

Saving Formulas and Comments

Microsoft Excel allows using formulas and comments.

However, it does not keep such formulas and comments for refreshed data.

SaveToDB 8 has an option, Keep Formulas, that saves formulas internally and restores them after refreshing data.

SaveToDB 10 has the Keep Comments option that does the same with comments.

Database developers can turn on or off these features on the server-side in the xls.handlers table using the following event types:

  • DoNotKeepFormulas
  • DoNotKeepComments
  • KeepFormulas
  • KeepComments

The SaveToDB add-in uses the primary key columns, identity columns, or columns with delete object parameter names as row indexes to save and restore formulas and comments.

Developers can define columns used as indexes in the HANDLER_CODE field.

You can use a special rownum value if the row number is a good solution.

For example:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 s03usp_budget_requestKeepFormulasATTRIBUTErownum
 s03usp_budget_requestKeepCommentsATTRIBUTErownum

KeepFormulas and KeepComments handlers also allow specifying columns to save and restore formulas and comments from a database (in the JSON format) in the COLUMN_NAME field.

For example:

IDTABLE_SCHEMATABLE_NAMECOLUMN_NAMEEVENT_NAMEHANDLER_SCHEMAHANDLER_NAMEHANDLER_TYPEHANDLER_CODE
 s03usp_budget_requestrow_formulasKeepFormulasATTRIBUTErownum
 s03usp_budget_requestrow_commentsKeepCommentsATTRIBUTErownum

This feature allows sharing source formulas and comments across all users.