I do enough programming to get into trouble. I wrote some excel VBA to publish selected ranges, charts etc to static web pages. When the destination is say iCloud and I later copy the file to an S3 bucket all is good, the file with extension .html is S3 type text/html. If i set the path in the macro to be the s3 bucket directly (using Cloudberry to mount the bucket as a drive) then the content type is octet. I see no way to fix this in excel/vba, but I may be wrong. Is there some way to set it up on the S3 side? The via code in part is:

    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 Answers