小编Aps*_*anj的帖子

C# 字符串中控制字符的转义码

我想找到 Microsoft Word 中使用的以下控制字符的代码。

在此处输入图片说明

我找到了其中的一些。如果我错了,请纠正我。我已经为他们浏览了网络。但我无法找到一些代码。

c# ms-word control-characters

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

使用 Drive api 获取驱动器文件的 blob

abc.dat我使用下面的脚本来获取通过我的 Apps 脚本项目生成的文件blob 。有了 Drive 服务,这一切就变得很简单。使用的 oauthScope 是https://www.googleapis.com/auth/drive.readonly

function ReadData() {
  var files;

  var folders = DriveApp.getFoldersByName("Holder");
  if (folders.hasNext()) {
    var folder = folders.next();
    var files = folder.getFiles();

    while (files.hasNext()){
      file = files.next();
        if(file.getName()=='abc.dat'){
          var content = file.getBlob().getDataAsString();
          return content;
        }    
    }
  }
  return '';
}
Run Code Online (Sandbox Code Playgroud)

为了减少身份验证范围,现在我正在修改代码以完全删除oauthScopehttps://www.googleapis.com/auth/drive.readonly并仅使用https://www.googleapis.com/auth/drive.fileoauthScope。

使用 Drive api,我没有找到获取文件 blob 的直接方法。我使用下面的脚本来获取 Word 文档文件的 blob。但它不适用于 .dat 文件并出现错误fileNotExportable, Export only supports Docs Editors files, code 403

function getBlob(fileID, format){

  var url = …
Run Code Online (Sandbox Code Playgroud)

blob google-apps-script google-drive-api

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