SSIS destination CSV file getting bad data - ssis

I have developed one SSIS package where I need to take records from database and send it in CSV file. While doing so I found that the csv file when opened in excel is showing some column records with = sign eg "=D7". Can you please suggest how to overcome the issue? Thanks,pallabi

Related

Is there a way to determine if the data is updated

So say I have a csv file with data and upload it on sql developer and then I make changes to the csv file and then upload it again on the sql developer which does gives me error.
Is there any way to upload the changed data in the csv file on the sql developer and it will notify saying these rows are updated?

ssis 2008, delete contents from excel

im using SSIS for SQL Server 2008.
My SSIS package grabs data from sql and exports it to an excel file. But everytime it does this I want new data on the excel.
The problem right now is, If i execute the package more than one time I will have the old data plus the new one on the excel file. I only want the new data displayed.
On the SSIS, on the Control Flow tab I have an Data Flow task. On the Data Flow tab I have an OLEDB source and an Excel Destination in order to put the data on the excel.
So im thinking on deleting the contents from the excel on the SSIS every time before the data gets inserted on the excel.
The excel file has an image, a title and the column names. I want these data to stay.
But I want the data from the rows deleted.
How can I do this?
Thanks...
Ok. What I did was to make a copy of the file and load the data on the new file, and everytime the ssis loads it overwrites the file, so I always have new data..........Thanks!!

How to overwrite Excel destination in SSIS?

I have created a package to fetch data from two SQL Server tables, and using merge join combined this data, then stored the result into an Excel destination.
The first time it works fine. The second time it stores repeated data in the Excel file.
How do I overwrite the Excel file rows?
Yes, Possible!
Here is the solution:
First go to your Excel Destination Click to New Button next to Name of Excel Sheet, copy the DML query inside.
Then put an Execute SQL Task into your Control Flow and connect it to your data flow that contains Excel destination. Set the Connection Type To Excel, Set the Connection to your Excel Destination's Excel Connection Manager, go to SQL Statement and type :
Drop TABLE `put the name of the sheet in the excel query you just copied`
Go
finally paste the query after it.
It is all you need to do to solve the problem.
You can refer to this link for a complete info:
http://dwhanalytics.wordpress.com/2011/04/07/ssis-dynamically-generate-excel-tablesheet/
Yes, Possible!
Using SSIS we can solve this problem:
first of all, crate an Excel format file (Structure Format using Excel Connection Manager) at one location as a template file. Then create a copy of that excel file using FILE SYSTEM TASK in another location and make sure that SET OverwriteDestination=True. Finally, using a data flow task, insert data into the new copied file. whenever we want insert data, it will create a copy of the template excel file and then load the data.
Unfortunately the Excel connection manager does not have a setting that allows overwriting the data. You'll need to set up some file manipulation using the File System Task in the Control Flow.
There are several possibilities, here's one of them. You can create a template file (which just contains the sheet with the header) and prior to the Data Flow Transformation a File System Task copies it over the previously exported file.
The File System Task (MSDN)
For Excel it will append data. There is no such option available for overwriting data.
You have to delete and recreate the file through the File System task.
Using a CSV file with flat-file connection manager would serve your purpose of overwriting.
The best solution for me was using File System Tasks to delete and recreate the Excel files from a template.
What I was trying to do was to send every employee a report with Excel attachment in the same format but different data. In a foreach container for each employee, I get the required data, create an Excel file and send a mail with the Excel file attached.
I first:
Create an Excel template (manually)
Create an original Excel file to be used (manually)
Then in the foreach container:
Delete the original file (SSIS File System Task )
Copy the template as the original file (SSIS File System Task)
Get the data from SQL Server and write them to the original file (SSIS Data Flow Task)
Send the mail (SSIS -> SQL Stored Procedure)

Excel to SQL - Very large file

I have a excel workbook with two sheets. One sheet is maxed out and the other is over half way. In total there's about 1.7 million rows.
Can someone help me with getting this into sql format. I need to import this into my sql server. I can either use Workbench or PHPMyAdmin.
The excel file is 84MB.
Thanks for your help.
Try to save your data as CSV file (Excel allows to do it), then import data from the CSV file into specified table with LOAD DATA INFILE statement.
Also, have a look at this feature - Data Import tool (Excel format) in dbForge Studio for MySQL.

Import Excel Spreadsheet to MySQL DB using VB.Net

I've got this problem of importing excel data to MySQL database. I want to create a VB.net application that allows the user to browse the excel file then click upload and automatically all the data in the excel file will be saved into the database.
I've already created a VB.net form with the browse thing and my only problem is the saving of the data. Can someone help me please.. thanks..
Store Excel file as comma separated text - CSV file.
Import data using LOAD DATA INFILE.