我正在测试 Google App Engine 并尝试运行一个简单的函数来将文件上传到 Blobstore 或 Cloud Storage。我直接在实例的 Cloud Shell 中键入 Python 代码。当我打电话时代码失败:
from google.appengine.ext import blobstore
我得到错误代码:
Traceback (most recent call last):
File "upload_test.py", line 1, in <module>
from google.appengine.api import users
ImportError: No module named 'google.appengine'
尽管文档说:您可以使用已经安装了 git 和 Cloud SDK 的 Google Cloud Shell,但我尝试安装了一堆库:
gcloud components install app-engine-python
pip install google-cloud-datastore
pip install google-cloud-storage
pip install --upgrade google-api-python-client
我仍然遇到同样的错误。如何让 appengine 库工作?或者,这是创建允许用户上传文件的应用程序的错误方法吗?
google-app-engine google-cloud-platform google-app-engine-python
我需要将多个Excel工作表导出到一个PDF文件中.我目前正在使用以下内容:
Sub CreatePDF()
Sheets("ReportPage1").Select
Range("Print_Area").Select
Sheets("ReportPage2").Select
Range("Print_Area").Select
Sheets("ReportPage3").Select
Range("Print_Area").Select
ThisWorkbook.Sheets(Array("ReportPage1", "ReportPage2", "ReportPage3")).Select
Selection.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:="C:\temp\temp.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheets("ReportPage1").Select
Range("A1").Select
End Sub
Run Code Online (Sandbox Code Playgroud)
问题是所有印刷区域都不同.生成的PDF使用ReportPage1中所有页面的打印区域的范围地址.
我在Excel之外尝试过,在VBA之外,当我选择了例如ReportPage1!A1:E30和ReportPage2!A1:F70时,当我选择两个工作表时,它会将所选范围更改为ReportPage1!A1:E30和ReportPage2 !A1:E30.
任何想法如何解决这个问题?
任何帮助都感激不尽.