node-google-spreadsheet icon indicating copy to clipboard operation
node-google-spreadsheet copied to clipboard

Single quotes being added to DATE at the beginning in spreadsheet

Open vinodhreddygs opened this issue 4 years ago • 5 comments

Hi @theoephraim ,

When Dates are added to the spreadsheet they are preceded with a ' but this should not happen. Is there any way to prevent by adding ' at the beginning of Dates?
Please refer the below screen shot for the reference:

image

Thanks.

vinodhreddygs avatar Jun 30 '20 09:06 vinodhreddygs

I got the same issue. Any workaround?

tsouza avatar Oct 30 '20 15:10 tsouza

I got the same issue. Any workaround?

Still no luck!

vinodhreddygs avatar Nov 02 '20 04:11 vinodhreddygs

My ugly workaround is to use a helper column like = A1*1

           rawData.getCell(min+j, 4).formula = '=F' + String(min+j+1)+'*1'
           rawData.getCell(min+j, 5).value = moment().format('YYYY-MM-DD HH:mm')

=> Correct date without the ' in column E

RobertSmith8 avatar Jan 01 '21 11:01 RobertSmith8

Correction is very necessary, otherwise you have to be perverted

Nemnon avatar Feb 06 '21 13:02 Nemnon

USER_ENTERED or RAW method if RAW, then ' - added

Nemnon avatar Feb 07 '21 10:02 Nemnon

It's because you're setting the date as a string. See https://github.com/theoephraim/node-google-spreadsheet/issues/363#issuecomment-1437308370

antony avatar Feb 20 '23 16:02 antony

combining into #630

theoephraim avatar Jun 27 '23 07:06 theoephraim