I have an excel sheet that contains a list of products along with its images. I have to receive them in my web API and store them into my DB.
How can I do this? I know how to parse a single image and the data but I don't know how to parse an entire excel sheet full of them
Thank you
I have created one application using openXML features to export excel file. Initially I tried to fill excel cell by cell but, I faced performance issue because of bulk data. Then I copied datatable content into Excel table.
Now I am able to generate bulk data.
But after generating excel file I am not able apply copy formula.
I've tried exporting a table which it has 5 TEXT columns and 1 BLOB column, this last column is used for storing images.
But, when I export the database table into a csv file (by using the software SQLite Database Browser) the information of this columns is transformed into TEXT as well. (Perhaps I was wrong)
How can I export BLOB data from my sqlite db table to a sql server table?
I will be so thankful if you help me. Please!! (I'm programming a c# application, but It doesn't matter, because I'm using SQLite Database Browser 2.0 b1.exe to see the data.)
I am making a window application in asp.net using C#. I want to browse and import .csv file and save it in the database. Importing part I have done. Now, how am i supposed to save it in the database ? I am new to the language so please help
You can use ADO.NET, you will need to look up Data Adapters and the like.
If your Importing the Spreadsheet into a DataTable or DataSet you can use a Data Adapter to populate a table in the Database using an INSERT command.
Look up http://msdn.microsoft.com/en-us/library/system.data.common.dataadapter.aspx
Hope This Helps.
Once you have a file upload mechanism in place, (for example, using the FileUpload control), just iterate through the lines in the CSV file on the server, parse them into fields using an existing CSV reader (don't try to code your own unless your data is completely trivial, you won't handle all of the edge cases), and just execute a bunch of SQL INSERT statements against your database using your calling convention of choice.
I have a text stream that I can save as a txt file and then call sql server stored proc to bulkinsert that txt file.
But I don't want to deal with file system access and all that stuff. and sqlBulkCopy can't do it I beleive. What's the solution then?
If the incoming stream represents rows for a table, then you can write a custom IDataReader implementation that reads from the stream and presents each row in turn (non-buffered). You can then feed this to SqlBulkCopy.
Example: https://groups.google.com/group/microsoft.public.dotnet.languages.csharp/msg/b1d70b504cdee2ad?hl=en&pli=1