Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 输入日期序列号并保留目标格式_Google Sheets_Google Sheets Api - Fatal编程技术网

Google sheets 输入日期序列号并保留目标格式

Google sheets 输入日期序列号并保留目标格式,google-sheets,google-sheets-api,Google Sheets,Google Sheets Api,我用日期序列号更新表格(如2013年12月7日的41615)。然后我对序列所在的列进行格式化,使其显示“07.12.2013” 我想更新工作表并保留格式,我尝试了: https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values:batchUpdate 具有以下有效载荷: {“valueInputOption”:“原始”、“数据”:“includeValuesInResponse”:false} 但它不起作用,它总是覆盖格

我用日期序列号更新表格(如2013年12月7日的41615)。然后我对序列所在的列进行格式化,使其显示“07.12.2013”

我想更新工作表并保留格式,我尝试了:

https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values:batchUpdate

具有以下有效载荷:
{“valueInputOption”:“原始”、“数据”:“includeValuesInResponse”:false}


但它不起作用,它总是覆盖格式。这真的可能吗?

我认为在您的情况下,例如,当列“A”的单元格格式为
dd\“/”mm\“/”yyyy
并且
41615
的值与您的请求一起放入列“A”using“values.batchUpdate”,put值显示为
07/12/2013
。所以我不能复制你的情况。我为此道歉。为了正确了解您的情况,您能否提供用于复制的示例电子表格?通过这一点,我想确认一下。顺便问一下,当您使用用户输入的
而不是
RAW
时,您会得到什么结果?就像上面提到的@Tanaike一样,您是否介意为此提供一个示例电子表格?您的意思是我应该授予您访问谷歌工作表的权限?实际上,复制它非常简单:将列“A”格式化为日期(任何格式),然后使用您尝试输入的API,例如41615。如果显示了格式,则应显示dsiplay 07.12.2013d您是否也向请求中添加了以下选项:
responseValueRenderProption
responseDateTimeRenderProption
@拉卢内古德角。不,我没有使用选项
includeValuesInResponse
,因为我不需要此响应