my requirement is that in nop commerce 1.9 i have to insert multiple discount form a excel sheet which have lot of data so before doing this task i need to be clear in mind which one is best solution for this.
Which is the fastest way to upload the excelsheet having more than 100,000 lines of code in C#?
i read this question and answer found that SSIS is an option .
is really SSIS is best for large size file import and export options.
and what other benefits i will get if i use SSIS packages ?
For ~100,000 rows, performance should not be a significant problem with this type of data. SSIS can do this, but it is not the only option. I think there are three reasonable approaches to doing this:
SSIS: This can read excel files. If your spreadsheet is well behaved (i.e. can be trusted to be laid out correctly) then SSIS can load the contents. It has some error logging features, but in practice it can only usefully dump a log file or write errors out to a log table. Erroneous rows can be directed to a holding table.
Pros
Cons:
BCP or BULK INSERT:
You can export the spreadsheet to a CSV and use BCP or a BULK INSERT statement to load the file. However, this requires the file to be exported to a CSV and copied to a drive on the database server or a share accessible to it.
Pros:
Cons:
SqlBulkCopy API: If you're already using .Net you can read from the spreadsheet using OLE automation or ODBC and load the data using the SQL Server Bulk Load API. This requires you to write a C# routine to do the import. If the spreadsheet is loaded manually then it can be loaded from the user's PC.
Pros
Cons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With