View Complete Post
One of the coolest new parts of Office 2003 is a programmability feature called Smart Documents, which allows developers to augment Word and Excel documents with programmable content and behavior. Typically, examples illustrating Office programmability use Visual Basic or Visual Basic .NET. In this article, the author develops a Smart Document for Excel using C++. He describes the new ISmartDocument interface and shows how to use it to manage a simple task list such as an Excel spreadsheet.
MSDN Magazine December 2003
My requirement is that i upload an excel file then i need to validate that data.
1. Uploading file using using upload control saving binary in SqlServer
2. Then i am creating file from binary data on Sql Server using below command and then using OPENROWSET to dump data to Sql table
3. Then reading Sql Table row wise and validating data.
Alter Procedure spUploadExcelFile
Declare @VarBin varbinary(max)
Declare @FileName varchar(100)
DECLARE @sql nvarchar(MAX)
DECLARE @errMsg nvarchar(MAX)
DECLARE @ObjectReturn INT
DECLARE @ErrorSource VARCHAR(255)
DECLARE @ErrorDesc VARCHAR(255)
DECLARE @ObjectToken INT
Select @VarBin = Content , @FileName = [FileName] from MultilangBinaryData Where PKID = @PKID
SET @FileName = 'C:\' + @FileName
EXEC sp_OACreate 'ADODB.Stream' @ObjectToken OUTPUT
EXEC sp_OASetProperty @ObjectToken, 'Type', 1
EXEC sp_OAMethod @ObjectToken, 'Open'
EXEC sp_OAMethod @ObjectToken, 'Write', NULL, @VarBin
EXEC sp_OAMethod @ObjectToken, 'SaveToFile', NULL, @FileName, 2
EXEC sp_OAMethod @ObjectToken, 'Close'
EXEC sp_OADestroy @ObjectToken
SET @sql = 'INSERT INTO dbo.UserBulkData SELECT 0,NULL,'+ @BatchI
we have an Analysis Server and it is accessible via http and that is all working fine, but if you try to create an offline cube on a PC which is not located in our company network it ends up every time in a failure like "OLE DB Error:...The
specified host is unknown. .; either can not connect to the server..."
Any ideas? It seems so to me that for creating the offline cube, the connection string is broken or something like that...
I have assigned a work to create a report, that should render in excel with dropdown list. i.e. report should contain a input parameter as a table names, when user selects the table name, report should show only the field names of the selected table. Some
of the field name have look up values that values should be displayed as dropdown when we export to excel.
Can any one have any idea how to proceed with this report?
SQLServer 2008 R2
Excel 2010 x64
I have a fairly complex Excel report where a raw data sheet is updated from 10 or so PivotTables pulling from an Analysis Services Cube, (2008 R2), with a VBA script that refreshes all pivottables, and then does some post-processing, formatting etc.
This was originally developed in Excel 2003, and the updating of all the pivot tables ran in under 10 seconds
I've now recreated in Excel 2010 and *each table* is taking up to a minute to refresh!
I've also observed that I can get the refresh time of a single table back down to 1sec, if I delete all other pivottables from the worksheet/book.
Its deeply frustrating, as I'm touting 2010 as being the way for our business to go...it won't help the cause if I deliver something with a x60 increase in runtime!
I've run traces of both the 2003 and 2010 versions executing against the SQL Server, the only thing I can see is that the 2003 version passes 1 single MDX query, whilst the 2010 version appears to be firing it in sections.
I've posted this in the Excel forum too.
Please can anyone help?
I have an Excel file with Pivot Table connected to MS SQL Analysis Services.
Is it possible to programmatically get this Pivot table (refreshed data) and save it as image (gif, wmf, emf, etc)
Hello Every One,
I have a scenario in which i am executing a Stored Procedure which returned a result set.
I want to create a Excel file [name_date_time] dynamically, and fill result set data into Excel file. And then finally sent Excel file to Specific user[Email ID].
Point is that the excel file should have unique name so i want to give name as name_date_time.
So every time when package run new file is created with unique name.
Can any one suggest me who to create Excel file and fill result set data into Excel file.
And then finally send that Excel file ?