Solved

iPhone opening excel file SSIS execute small console application

Posted on 2013-11-12
3
49 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
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

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now