为什么Excel发布的静态html文件在Amazon s3上具有内容类型八位字节?

时间:2019-05-04 04:34:46

标签: excel amazon-s3

我做了足够的编程来遇到麻烦。我写了一些excel VBA,可以将所选范围,图表等发布到静态网页。当目的地为“ iCloud”,而我后来将文件复制到S3存储桶时,一切都很好,扩展名为.html的文件为S3类型的text / html。如果我将宏中的路径直接设置为s3存储桶(使用Cloudberry将存储桶安装为驱动器),则内容类型为八位字节。我看不到在excel / vba中解决此问题的方法,但我可能是错的。有什么办法可以在S3端进行设置吗?部分via代码为:

    outputfile = "X:\WebPublishedicloud\" & PageName & ".html"
    ' publish file
    If PubTyp = 1 Then
         With ActiveWorkbook.PublishObjects.Add(SourceType:=xlSourceSheet, _
        Filename:=outputfile, Sheet:=sheetname, _
        HtmlType:=xlHtmlStatic)
        .publish
        .AutoRepublish = True
        End With
    ElseIf PubTyp = 5 Then
        With ActiveWorkbook.PublishObjects.Add(SourceType:=xlSourceChart, _
            Filename:=outputfile, Sheet:=sheetname, _
            HtmlType:=xlHtmlStatic)
            .publish
            .AutoRepublish = True
        End With
    ElseIf PubTyp = 4 Then
        Set Pubrange = ActiveSheet.Range(Addr)
        PubrangeA = Pubrange.Address
        With ActiveWorkbook.PublishObjects.Add(SourceType:=xlSourceRange, _
            Filename:=outputfile, Sheet:=sheetname, _
            Source:=Pubrange.Address, _
            HtmlType:=xlHtmlStatic)
            .publish (True)
            .AutoRepublish = True
        End With`

0 个答案:

没有答案