Solved

iPhone opening excel file SSIS execute small console application

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

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can I use this function? 3 34
2008 R2 time server is invalid 6 38
How to keep a record with the highest value 3 42
Decommissioning DNS server question 3 36
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
I have a large data set and a SSIS package. How can I load this file in multi threading?
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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