jpillora / node-edit-google-spreadsheet

A simple API for editing Google Spreadsheets
304 stars 101 forks source link

Update return value for cell #40

Closed jleplomet closed 10 years ago

jleplomet commented 10 years ago

cell.$t encodes HTML text if used in spreadsheet. cell.inputValue return text as written.

jpillora commented 10 years ago

Hi Jeff, I can't remember why I'm using cell.$t though I know it was for a reason... Could you find a definition of what each of the cell attributes/values are?

jleplomet commented 10 years ago

The inputValue attribute of a cell entry always contains the value that a user would otherwise type into the Google Sheets user interface to manipulate the cell (i.e. either a literal value or a formula). To set a formula or a literal value on a cell, provide the text of the formula or value as the inputValue attribute. Remember that formulas must start with = to be considered a formula. If a cell contains a formula, the formula is always provided as the inputValue when cell entries are returned by the API.

Looks like cell.$t will return text values of the cell while cell.inputValue will return as typed. Can we create an option to allow us to set what is returned?

jleplomet commented 10 years ago

Hello

Any way to allow me to merge this conflict for you? I tried to fix it but not sure how to remove the initial commit for this pull request.