Solved

iPhone opening excel file SSIS execute small console application

Posted on 2013-11-12
3
79 Views
Last Modified: 2016-06-07
I have encountered the problem of iPhones and iPads not opening excel attachments. I get a gray image with the name of the xls file. If I send xlsx I get one blank box. I have learned that if AFTER I create the excel file with SSIS, I open the file with excel, refresh and save then close the file, then use dbsendmail to attach the xlsx it will open fine. I am getting an error though that says "Can't create activex object" when I run the stored procedure that includes calling the windows exe below. It runs perfectly if I double click it. I also tried running it as an execute process task and it fails with the can't create activex error. Why can't I run this with a stored procedure or SSIS Process task?

Module Module1

    Public Sub Main()
        ' Create an Excel instance
        Dim oExcel
        Dim oWorkbook
        oExcel = CreateObject("Excel.Application")
        ' Disable Excel UI elements
        oExcel.Visible = True
        oExcel.DisplayAlerts = False
        oExcel.AskToUpdateLinks = False
        oExcel.AlertBeforeOverwriting = False

        oWorkbook = oExcel.Workbooks.Open("D:\export\temp\aDailyTransfer.xlsx")
        oWorkbook.RefreshAll()
        oWorkbook.Save()

        oExcel.Quit()
        oWorkbook = Nothing
        oExcel = Nothing
    End Sub

End Module
0
Comment
Question by:CreativeLite
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 39647976
Hi,
which SQL Server version (version number and architecture (32/64bit) and edition are you using? The 64 bit version?
What process is executing the SSIS package?

I guess that the package will be run in x64 bit mode hence your ActiveX error as I assume your installed Excel application is 32bit.

Second I would recommend to set the property
oExcel.Visible = False

Open in new window


Could you perhaps briefly describe what you try to achieve?
What Excel version and file version do you want to create? Old (<=2003) or new format (>=2007)?

Thanks.
Rainer
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Know what services you can and cannot, should and should not combine on your server.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question