小编nex*_*tor的帖子

获取Python中google电子表格api v4中的工作表和最新工作表列表

我试图在谷歌官方文档之后阅读和编写python 3中不同表单的值.虽然我能够使用rangeName = 'Class Data!A2:E'下面提到的代码块中的range属性读取某些工作表中的值:

discoveryUrl = ('https://sheets.googleapis.com/$discovery/rest?'
                    'version=v4')
    service = discovery.build('sheets', 'v4', http=http,
                              discoveryServiceUrl=discoveryUrl)

    spreadsheetId = '1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms'
    rangeName = 'Class Data!A2:E'
    result = service.spreadsheets().values().get(
        spreadsheetId=spreadsheetId, range=rangeName).execute()
    values = result.get('values', [])
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用此处示例代码编写值:

requests.append({
    'updateCells': {
        'start': {'sheetId': 0, 'rowIndex': 0, 'columnIndex': 0},
        'rows': [
            {
                'values': [
                    {
                        'userEnteredValue': {'numberValue': 1},
                        'userEnteredFormat': {'backgroundColor': {'red': 1}}
                    }, {
                        'userEnteredValue': {'numberValue': 2},
                        'userEnteredFormat': {'backgroundColor': {'blue': 1}}
                    }, {
                        'userEnteredValue': {'numberValue': 3},
                        'userEnteredFormat': {'backgroundColor': {'green': …
Run Code Online (Sandbox Code Playgroud)

python google-spreadsheet-api google-sheets-api

16
推荐指数
4
解决办法
2万
查看次数

无法在java中获取ASCII代码

我正在尝试获取http://www.ascii-code.com/中提到的ASCII字符的数字值

String str = "™æ‡©Æ";
for(int i = 0; i < str.length() ; i++) {
    char c = str.charAt(i);
    int code = (int) c;
    System.out.println(c + ":" +code);
}
Run Code Online (Sandbox Code Playgroud)

输出:

™:8482
æ:230
‡:8225
©:169
Æ:198
Run Code Online (Sandbox Code Playgroud)

我的问题是:为什么'™'和'‡'的值分别不是'153'和'135'?如果可能的话,如何获得这些值?

java

1
推荐指数
1
解决办法
615
查看次数