?
Solved

iPhone opening excel file SSIS execute small console application

Posted on 2013-11-12
3
Medium Priority
?
87 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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

762 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