.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SSIS issue with dynamic excel sheet name

Posted By:      Posted Date: September 16, 2010    Points: 0   Category :Sql Server
Hi Team, I am creating a Excel file dynamically using a script, excute sql and then the dataflow. I am not able to cretae a excel sheet name without an underscore exisitng file: "team data" even though am giving the table name in excute sql task(which is excel sheet name) as "team data" it is creating the name as "team_data" because of which the package is failing? I am able to achieve this with an underscore, as it is a client requirement to generate wihtout an underscore am posting this question. Is this an issue with Sql server 2005? Thanks, Eshwar  

View Complete Post

More Related Resource Links

How to use Dynamic Set to fix Multiselect Issue in Excel



I have a calculation that fails within Excel 2010 when I select more than one date from my dimension . I have been told (by Deepak) that this is because Excel uses a subselect instead of a where clause (which Excel 2003 & earlier use). I have tested this by saving a new file as an .xls then open it in compatability mode and create my pivot table as an older version; in this instance, my calculation is (mostly) okay. I was refered to this article for help: http://sqlblog.com/blogs/mosha/archive/2007/08/25/mdx-in-katmai-dynamic-named-sets.aspx

Please see my next post for more info (as I have had formatting issues in the past with my first posts).


Dynamic PAckage to import multiple excel 2007 files in SSIS 2005


I want to import multiple excel 2007 files into Sql Server Database using SSIS 2005.

Can someone explain me the steps as i am new to SSIS.

newbie to SSIS - moving data from excel files with dynamic name



I am a new to SSIS but not new to SQL server.  I have been used to programming stored procedures and such to get data in to SQL.  I need to daily import processes of excel files.  However, the name of the excel files change every day.  Is there anyway to dynamically handle this?



display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

delete record from excel sheet



           I have write the code for deleting the data in excel sheet. but we have got the error" Deleting data in a linked table is not supported by this ISAM."

     below I paste some code snippest.

string strDelete = "Delete  from [" + strSheetName + "$]";

            cmdExcel.Connection = con;
            cmdExcel.CommandType = CommandType.Text;
            cmdExcel.CommandText = strDelete;


Please can anybody this answer.It is urgent

delete data in excel sheet



           I have write the code for deleting the data in excel sheet. but we have got the error" Deleting data in a linked table is not supported by this ISAM."

     below I paste some code snippest.

string strDelete = "Delete  from [" + strSheetName + "$]";

            cmdExcel.Connection = con;
            cmdExcel.CommandType = CommandType.Text;
            cmdExcel.CommandText = strDelete;


Please can anybody this answer.It is urgent

How to read value of CheckBox in EXCEL sheet


I am using OLEDBConnection (@"Provider=Microsoft.ACE.OLEDB.12.0;") to connect to the EXCEL file and read contents. When I read the contents, I get all the contents from the excel sheet but i dont get contents for checkboxes placed inside.

My Excel sheet contains set of checkboxes and I need to know If they are checked or not.These checkboxes are controls which are added from Developer tab in EXCEL.

I dont want to use Excel Assemblies for reading contents as it is not recommended. And also i am using OLEDBconnection and want to stick to this .

Awaiting replies from you guys. Thanks in Advance.

Export Gridview data to Excel sheet


Hi ,

     I have a requirement where i need to export the gridview data to excel.My code export the data in excel that was fine.

But the enchancement needed now , I was exporting the 3 gridview in same excel sheet under the workbook.

Now i need to export the 3 grid view in 3 different sheet in the same workbook.

so can please tell or share the updated code in my below code ...

public void writeovrsummary()


        Response.Write("Overall Summary");
        //Response.Write("Report as of " + DateTime.Now.ToString("hh:mm ss tt"));

        StringWriter sw = new StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);

        SqlCommand com = MyConnection.CreateCommand();
        com.CommandText = "useroverall_Report";
        SqlParameter[] par = new SqlParameter[1];
        par[0] = new

Export Dataset to excel sheet in a required format?



I know how to export a grid view to excel.

But here i have a Dataset which consists of data like below and also it need to display in a required format like below.

pno psubno pstate pdetailid pdetails

 12    1          CA         1           cbsdjcbdjc     

12     1          CA          2        cndcnjdcjcj

12     2           VA         4          xcndwkfcgygry

13     1            AL        1           ncdcnjdcndj

My excel sheet  should like this.

pid       pstate     

 12/1      CA             &nb

export to excel issue


Hello ,

I have a browser enabled form which i published to sharepoint ..now i want to export the contents of the form to excel..i have 1 repeating table and two repeating sections ..whenever i go to export to excel and then choose just one repeating table or a repeating section or any option other than export all form data i get an error ...first the progress bar just freezes and then when i end the task through task m anager i get a msg that microsoft excel could not start.make sure excel is installed correctly and then try again....

Can somebody tell me how to debug this..i have tried the export of a form containg repeating table and sections and it works good ..so that means there is some problem with my form..so now can somebody give me an idea as to what can the problem be and how can i debug it.


Mulitiple Connections to Excel Sheet


I have a spreadsheet that I want to link to Sharepoint as a list.  I want to use Sharepoint to make updates to the spreadsheet as well as for lookups in other lists.

My problem is that the spreadsheet already has a data connection to a SQL database.  The spreadsheet doesn't update the DB directly but the DB connection is used to keep the spreadsheet updated with new data edited directly in the DB.  I don't own the DB or the spreadsheet so cannot convince them to do their editing another way (directly from the info in the spreadsheet for example) so ...I HAVE to keep the existing connection to the DB. 

My question is...is it possible to keep the connection to the DB AND link to Sharepoint?

OR..is there another solution? 

ASP.NET Excel Export Issue



I am trying to export data from SP to a .xlsx sheet. Total no of rows is more  than 15000 with total of 13 columns.The data is generated with the help of SQL Server SP. Till this point it is working fine. However while exporting to excel I do not get any data , the excel  has blank content.

If I have records less than 12000 it generated the excel report with  relevant data. However as row increases the report is blank.

Also the excel is generated through the code but when I deploy to server and try to generate it generates a blank excel. 

 Please advice what needs to be done. I have tried multiple options but none works.

Sheet Master in Excel vs Slide Masters in PowerPoint


Is it possible to create a Sheet Master in Excel as we create Slide Masters in PowerPoint?

For example, I'd like to insert a picture in several sheets and i couldn't find a better way than copying/pasting the pic in each sheet.



SSIS Lookup Transformation Issue

I am having a strange issue, In my data flow i have a Lookup Transformaton which will match on key columns of the fact and is followed by a condetional split that would deside if it should insert (old db destination) or go to update (oledb command) or ignore if no change. I have packages running for the last 1 year with the same logic. But in the recent packages I am experiencing a problem.  example: Key columns for join are - type_no (varchar 16) with all numeric values except one record wihh ' '(space) in it  and type_cd (decimal(18,0)) with values(0,1,2,3,4,5) It worked fine when I test the package. After couple of day running in schedule I get integrity violation and huge file with failed records which are supposed to be blocked at the condetional split as they are already in the fact. When i add a data viewer what i found is for all the llokup columns its having nulls (no match found). Workaround that is working for me for now is - I select full cash and say ok in the lookup transofrmation and again open it and set it back to no cash. Then it starts working as expected. Did anyone come accross this kind of issue? is the some standard that I have to follow to make sure this doesnot happen again  

In export, i want to disable column in excel sheet

Hello, I am doing Import/Export. While export i want to disable some column in excel sheet, so during upload or import same primary key I can use, instead of user modify such column. Regards, Sandeep    

Can not get excel connection when calling an SSIS package from ASP

I have an SSIS package importing data from excel. I have coded it and deployed it on the sql 2008 server. I then execute it via a stored procedure with the following: select @cmd = 'C:\"Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\DTExec.exe" /sq "HRIS"' select   @cmd = @cmd + ' /SET \Package.Variables[User::path].Properties[Value];"' + @path + '"' exec   @rtn = master..xp_cmdshell @cmd   This works fine when  i execute it on my local machine. But when I try to call this Stored proc from my asp app (classic asp, not .net) I get the error: Code: 0xC0202009 Source: HRIS Connection manager "SourceConnectionExcel" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft JET Database Engine" Hresult: 0x80004005 Description: "Unspecified error". End Error   Any help would be greatly apprecitated

Excel sheet is not saving data while sending email

Hey Guys,  I am creating a SSIS package, where I am getting all the data into the excelsheet1, which is not formatted. So i created a formated excelsheet2, where i am giving reference to excelsheet1 cells reference. And I am sending email by attaching excelsheet2.              I am having issue when the data is updated, but my email attachment excel is showing old data. When i open the excelsheet1 it is being updated. I don't know why excelsheet2 is not updated automatically. I am using BIDS 2005 . Can anyone please suggest what will solve my problem. Thanks in Advance Priyamvadha
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend