I have a requirement that the user will need to import a list of ID's to the asp.net website from their own spreadsheet. I will provide a button 'btnImport' which will use an OleDbConnection to read the spreadsheet and pull in the id's. I have that working fine in my local dev environment. My question is, when this app is running on a production server, will the user have to upload her spreadsheet to the server first? Or do I need to provide code that will find the file on her machine? I'm not sure how this part of it works.
from an Access database, I created an Excel spreadsheet. On the spreadsheet I made the adjustments I needed to and then proceeded to use the SQL Server 2005 Import/Export Wizard to import the spreadsheet into a SQL table. I then get the following error message:[Code]....
When I remove the problem columns from the import, then it works just fine. But I really need those text columns! The SQL Server columns that they are supposed to go into are varchar(MAX).
this is me once again moving around data access. my problem now hide in the import process of an excel file that would be inserted into sql db.
the problem is the excel file may be updated or changed and i have to periodically import it and perform the process but I still cant check or compare between the two Data Source (excel, sql) as I violate the entity integrity (PK)
i found a kind of stupid approach that each time i want to import the file i will empty the table then re-insert the data, but at this step a new problem raise that other tables are !engaged! with it ... so i will violate the referential integrity (FK)
i looking for solution to compare between two sources for each tuple / row, ignore the existing one and insert the new
I have a form that allows a user to import a spreadsheet. This spreadsheet is generally static when it comes to column headers, but now the users want to be able to include an optional column (called Notes). My code crashes when I try to read the column from the spreadsheet if it doesn't exist.
I have to import the contents of a spreadsheet in my asp.net project. The code behind is c#. how to locate the spreadsheet on the user's computer and how to import the data from a given worksheet into a datable. The problem is I may not know the name of the worksheet ahead of time. How do I present the user with a list of available worksheets and have them pick one?
I'm trying to upload an excel spreadsheet using the FileUpload control, read the excel sheet using OleDb connection, and save the strings onto a sql server database.Then, I'm trying to read each string in another method.My web app is currently hosted on the network on my local box, and using savePath= @"C:desktop" like I had it previously wasn't working, so I figured using a sql server database would work for being able to save the file and open it again... but I'm getting confused on how to do so, so i tried using my old savePath but it's not working anymore. So... I'm really at a lost on what to do and how to fix it.
I simply have a lot of data in two columns in an excel spreadsheet of data that I gathered. I want to copy and paste this (manually) into a table that I have created in my ASPNETDB in my ASP.NET web application. I thought it'd be as easy as copy the column, and hit paste in the "table data" view, but it's not (it only pastes one cell).
Is there a way for me to manually copy data from excel and paste it in a table in my SQL Server?
I have a table with 100 records. I need to import extra 50 records in the same table. So from 101 to 150 records should insert the data which is present in excel Simply I want to import 50 records from Excel to Table without disturbing the first 100 records.
I got an excel spreadsheet (will have tons eventually) that have "Start Date" and "End Date" columns, with a format of "dd/mm/yyyy".For time being, I just want to import these to a temporary table in my database, and use the SQL Server Import/Export wizards.
Now this wizard import the the above fields as nvarchar, instead of date or datetime (not sure which would be better?).I tried to convert the columns to datetime after importing, but this is not allowed (Saving changes is not permitted. The changes you made require that the following tables to be dropped and re-created, ......).
So I deleted the temporary table, and ran the wizard again, this time trying to edit the mappings and specify the two fields to be date times, but this also fails.I also fiddled around with convert and cast, but always end up getting "Conversion failed when converting date and/or time from character string." errors.
I looked myself skew, and are pretty sure all the fields in the excel sheet do have values, and are in the "dd/mm/yyyy" format.(I've been absent from SQL for a long long time!)
I am trying to insert data from excel file into sql server database table. which is working fine.. But when i tried it in table which has primaryKey As Autonumber and date as getdate(). its not inserting values in rows?
i am currently working on importing excel sheets into my database.
SqlBulkCopy seems to be working fine, when i whole import the data over.
But i can't do automated validation (i.e. checking for identical data in the database & etc, i am stuck!) i can import the excel sheet data a line at a time , and perform automated validation check on them.
I am trying to work through a sample of exporting a gridview to an excel spreadsheet.I found the code below on the internet. I pasted it into a test.aspx page. I need to establish a connection to the NorthWind Database. Or if you have a better example of exporting a gridview to excel, share. Here is the location of the northwind.mdb on my pc: (and is this sample looking for an access database or a sql database...what is the filetype of a sqlserver database?) See code below
c:Program FilesMicrosoft Visual Studio 8SDKv2.0QuickStartaspnetsamplesdataapp_data orthwind.mdb
I developing a application in Asp.net3.5(C#) and Sql server2005, my problem is that i have to Import data from diffrent-2 data sources like MS Access, Oracle, ODBC, XML to my Data base(in Sql server) using C# code. I don't know any thing about importing data from these data sources.
Possible Duplicate: Create Excel (.XLS and .XLSX) file from C#
I have some code that generates a zip file that contains multiple CSV files and streams it back to the user (no file is saved on the server). However, I want to create an excel workbook instead (can be traditional xls or Office Open XML xlsx format) with each CSV 'file' being a spreadsheet.
How can I do this, without resorting to Office Automation on the server or a commercial 3rd party component?
I'm working on a project which requires me to plot a graph using Visual Studio ASP.Net from a data I've collected either in .txt or .xml format. The data consist of, eg. 15 records, but I'm only needed to plot 8 graphs out of the 15 records.
I'm exporting an ASP.NET gridview to Excel using the following function. The formatting is working really well, except I need to freeze the header row in Excel on the export. I'm really trying to avoid using a 3rd party Excel plugin for this, but unless there's some archaic excel markup in my AddExcelStyling function.
On an .aspx page in a web site I need to retrieve some data from a sql server database and, instead of displaying it in a Gridview, I need to put the data in a spreadsheet and present the user with a Save As dialog.
I'd prefer to do it without using the Office / Excel / Interop com object - so, from what I've read so far, I can do this by returning XML data from SQL Server?
Normally I get data from SQL Server and populate a dataset or datareader with it - and then use this as the Datasource of a GridView.
If I run this in SQL Server ...
Code: SELECT UserID, UserName FROM tblUsers FOR XML Auto, Root('Users')
So, first question - how do I get the data from SQL Server into my .aspx page? (All data access is done with stored procedures - so, from my data access class normally I create, for example, a SQLDataReader and populate it by calling a stored procedure. What object would I populate with the results of a stored procedure that contains a select statement with 'FOR XML Auto'
Then, assuming I get the XML into the .aspx page - how do I get it into a spreadsheet so that there are two columns called UserID and UserName and 3 rows with 1, 2 and 3 in the first cell and Steve, Andrea and Zebedee in teh second cell?