duancong7573
2017-03-06 15:55
浏览 33
已采纳

PHP:使用样式上传Google Drive上的csv / spreadsheet文件

I'm building a web application that should upload csv/spreadsheet files to a user's Google Drive. I've done all of the steps successfully and the CSV files are uploaded just fine.

However, my question is, can I somehow apply some styles to the CSV file before uploading it?

For example, let's say that I want to apply a red color to the first column with a white text for labels instead of the default text/background color... is this possible via the Drive API?

图片转代码服务由CSDN问答提供 功能建议

我正在构建一个应将csv / spreadsheet文件上传到用户的Google云端硬盘的网络应用程序。 我已成功完成所有步骤,并且CSV文件上传得很好。

但是,我的问题是,在上传之前,我可以以某种方式将某些样式应用于CSV文件吗?

例如,假设我想将红色应用于第一列,标签使用白色文本而不是默认文本/背景颜色......这可能是通过 Drive API?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • duanmie9741 2017-03-06 17:25
    已采纳

    You can't store formatting information in a CSV file, so the answer to the question as asked is No.

    However, you can use the Sheets API to change the formatting after the csv data has been uploaded. There is an example here https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题