简体   繁体   中英

PHP: Uploading csv/spreadsheet files on Google Drive with styling

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM