ADO.NET :: Option For User To Upload Excel File?

Feb 3, 2011

I've an application built on asp.net 2.0. There is an option for user to upload excel file. Once the file has been uploaded the data in the file is validated against some business rules. Rows that successfully validates are inserted into database as soon as it is validated.

I use ado.net to connect to excel file. And use data reader to iterate over all the records. Normally the number of records range from 5,000 to 20,000. This process takes good 8 to 10 minutes. I want to optimize this process because to my understanding it takes too long. Currently I am looking at OPENROWSET, OpenDataSource which so far is unsuccessful. Valiation that takes place on every row is very simple. I only checks for maximum length. So validation itself is not an issue.

View 3 Replies


Similar Messages:

File Upload (in Excel File) Option

Feb 10, 2010

I have to create upload file program and this file should be uploaded in excel file. I do not want to use Pacakage.

View 5 Replies

Upload Gridview To Excel - Allow User To Select Where To Download The File

May 21, 2010

I have a gridview that allows the user to export this gridview to excel. Here is my codes but I would like my user to be able to select where to download the file

Protected Sub ExportToExcel(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click
lblMsg.Visible = True
Try
Dim objSw As New StreamWriter(txtFileName.Text.Trim + ".xls")
'Dim serverFilePath As String = "D:Excel Files"
'Dim fileStream As New FileStream(serverFilePath, FileMode.Open)
'Dim fileSize As Long = fileStream.Length
'Response.ContentType = "application/octet-stream"
'Response.AddHeader("Content-Disposition", "attachment; filename=""" & txtFileName.Text.Trim & """;")
'Dim fileBuffer As Byte() = New Byte(fileSize - 1) {}
'fileStream.Read(fileBuffer, 0, CInt(fileSize))
'Response.BinaryWrite(fileBuffer)
'fileStream.Close()
'Response.[End]()
Dim objDt As DataTable = DirectCast(Session("Data"), DataTable).Copy()
'Get No Of Column in GridView
Dim NoOfColumn As Integer = objDt.Columns.Count...........................

View 2 Replies

C# - Get Option To Preview Or Save File After Upload?

Jan 27, 2010

I got a pdf creator on my webapp where my user can create a pdf with different stats. How should I do so they get the option to prewiev or save the file right after the creation of it? the file is saved.

View 1 Replies

File Upload Control And Not Permitting User To Upload Over 500px In WIDTH ?

Sep 24, 2010

I have a file upload control on my page with a regular expression validator that handles the file format.

Users can upload files but I want the maximum WIDTH size to be 500px.

If any bigger I need to show a message advising the width is to great and stops them.

View 3 Replies

How To Upload An Excel File

Dec 2, 2010

I am trying to upload an excel file and my code reads the data of excel one by one. Unfortunately as we all know that excel doesn't restrict the data type for each cells, so there is a chance and possibility that my code can catch the exceptions.

How can I do this?

Code:

try
{
// do the statement
}
catch
{
// throw the exception, log it and then proceed to the next, don't stop.
// then prompt the users of all exceptions encountered.
}

I need to process more than 1,000 rows of data from excel. I don't want every time there is an exceptions the uploading process stops and fixed the problem then re-upload the data again. I want to consolidate first all the data with issues or exceptions then deal with it later after the uploading process done.

View 3 Replies

.net - Upload Only Excel File Using RegularExpressionValidator?

Jul 29, 2010

i need to control Only ExcelFile uploading with RegularExpressionValidator How can i do that? i need to write a regex pattern in ValidationExpression...

<h3>FileUpload Test</h3>
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button id="UploadBtn" Text="Upload File" OnClick="UploadBtn_Click" runat="server" Width="105px" />
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<asp:RegularExpressionValidator
id="FileUpLoadValidator" runat="server"
ErrorMessage="Upload Excel only."
ValidationExpression="([a-z]w*)(.xlsx|.xlsm|.xls)$"
ControlToValidate="FileUpload1">
</asp:RegularExpressionValidator>
</div>

View 2 Replies

Web Forms :: Upload Large Excel File - Use Multithreading?

Mar 7, 2011

i have a large excel file which has 1 lakh row , i want to insert these data in my table i am using entity framework for insert but it takes more than 45 minutes to insert which is too much, i want to speed up the uploading process what should i do. can I use multithreading for it if yes then how i can use? if any other way to do this process.

View 1 Replies

Web Forms :: Cannot Upload An Excel File From Local Pc To Web Server

Jun 29, 2010

I have a simple webpage which uses the FileUpload control. I am trying to select a file from the local pc and save it to the web server which is a remote server on the company network. I have a shared folder on the web server with the appropriate permissions. The folder authentication is using a predefined user name and password.

I have tried My.Computer.Network.UploadFile and System.Net.WebRequestMethods.File.UploadFile. For both methods I am getting the following error:

System.IO.FileNotFoundException: Could not find file 'C:empfilename.xls'

View 7 Replies

Databases :: Upload And Import Excel File Without Saving First?

Apr 13, 2010

I need to be able to have a user upload an excel file, then immediately work with that file and save the contents in a database.

I know how to do this if I save the file first, then open it using OleDB, BUT I would rather not save it first.

View 3 Replies

SQL Server :: Upload Excel File Giving Error

Dec 3, 2010

when i tring to upload excel file in sql,it was upload few recoreds and gives me error. i can not understand the error.

View 5 Replies

Databases :: Upload Xlsx (MS Excel) File To Oracle DB?

Jan 18, 2011

I would like to upload a xlsx file to Oracle DB (Oracle 11g). I'm using VS .NET 2008 (C#, web).

The file contains around 500 rows.

View 3 Replies

Databases :: Upload An Excel File And Read In Memory Without Saving?

Mar 15, 2011

I need to upload an excel file using a web application. Then I need t oread it in memory without saving it on the server.

Does the file need to have headers? Also the data is such that it may have or may not have values for some columns.

View 1 Replies

Is It Possible To Upload And Save Excel File As Blob In Sql Table Through Web Application

Jan 1, 2010

Is it possible to upload and Save Excel file as blob in Sql table through web application?

I do not need to query excel file, just be able to upload and download excel file as is.

View 2 Replies

Databases :: Upload Excel File Into Oracle - System Resource Exceeded

Jan 5, 2011

We have the data in excel file and want to upload the same into Oracle table.To achieve this we are using following query
insert into [ODBC:Driver={Microsoft ODBC for oracle};connectionstring].tablename (select * from sheet$ )
This is working fine for less records but when the record count increases following is the error faced. Error : System Resource Exceeded

We tried the following:
1. We tried to remove connection pooling for oracle.
2. We tried to remove connection pooling for excel.
3. We also verified that only one connection for each (oracle and excel) is open.

Our assumptions:
1. Either the server setting is the issue
2. Jet oledb Driver is the issue.

View 1 Replies

DataSource Controls :: Inserting Excel Data Via File Upload Into Sql Server Database?

Apr 28, 2010

I have requirement that User can Upload the Excel Sheet Data to sql server Database at once.

View 16 Replies

DataSource Controls :: How To Create User Ability To Upload Excel To Sql And Display Results As Table On .aspx Page

Mar 12, 2010

Hardware involved:
SQL Server 2000
Microsoft Server 2003 with IIS6 [code]...

The goal, from internal department (user) perspective:A department wants to "upload" an excel spreadsheet of data (product, term, rate, etc) to SQL (this will be from the internal network). The data is then saved to a webpage location for that department to view and approve. Once "approved," this data is displayed on the live web servers (public-facing website which is two load balancing servers).
Bonus:

The .NET application/SQL Server can send an email to the department reminding them to upload the latest rates (each weekday morning, then each Thursday afternoon) if rates have not yet been "approved."

From the development perspective, this is my general idea, but I may be wrong.There are three spreadsheets, each with one tab. The first spreadsheet is uploaded, and the .NET application puts it in a SQL table. I then need to display this table of data on a .aspx page for the department to approve before the .aspx page is pushed to the live web servers.

First, I need an interface for this department to upload Excel files. I need this application to save the data to SQL and display it in a .aspx page so that the department can look it over and approve it. The department needs a way to "approve" the page, and this action will push the data to the live web servers. Will this involve SQL data transformation services?

View 2 Replies

How To Upload A User's File To A File Server Without Using FileUpload

Oct 2, 2010

I need to upload a file (xml, pdf, etc) from the user's PC, but I need to write it directly to a file server. I cannot use FileUpload because there is no way to direct its initial upload to anything but the web server. So, how do I use the HTML INPUT to upload the file from the user's PC directly to a file server located at a different URL than the web server the web page is being hosted on?

View 2 Replies

AJAX :: Async File Upload Control - Check File Contenttype Before File Upload Starts?

Jan 13, 2010

I am using the async file upload control to upload to a image file. I want the user to upload only jpg files. And for that I am checking the uploadedfile content type in server side, after the upload complets. I wanna check this, before upload starts. There is one javascript method

function startUpload(sender, args){}

but how to access the content type of the file selected by user.

View 5 Replies

Ajax - User Can Upload An XML File?

Feb 18, 2010

Question:
I have a web interface where a user can upload an XML file, which then gets imported into a SQL database.

Import works fine, interface works fine, logfile works fine. The problem: The user doesn't get any progress report until the entire file has been processed... Is there any way the server can output logfile messages to the user page while processing? I mean AJAX doesn't work for server side calls to the client, only vice-versa, or is there a workaround ?

View 2 Replies

Security :: File Upload With Different User?

Feb 15, 2010

i use file upload to upload file a folder. but i need to give write permission to IUSR_MACHINENAME user. Can i achieve this with different user Account Credidental?

View 2 Replies

Visual Studio :: How To Upload Excel Sheet In Vs2008 And Save The Excel Data In Sql Server 2008

Mar 9, 2010

I want how to upload the excel sheet data and that data will save in Sql Server 2008(table).

View 2 Replies

C# - Restrict A User To Upload Only Image File

May 28, 2010

I am using FileUpload control to facilitate Image file upload on my website. I want to restrict a user to upload only Image file. I am using

if (fupFirmLogo.PostedFile.ContentType == "image/Jpeg")
{
}

to check if the file is a image or not. I want to allow all image extensions like PNG, GiF, Jpeg, tif , BMP etc. How should I do it.

View 4 Replies

Can User Select And Upload More Than One File At A Time

Jun 30, 2010

I made a website for a friend and he uploads a lot of pictures, around 20k per month. And sadly, I made it so he has to upload 1 at a time, because when they are uploaded they are renamed, attached to a group id and watermarked. Is there a way to allow him to select all 20 in a group and have them be uploaded and processed? I've looked into a couple of way to do it, mostly flash, and that will not work since we are renaming and added the newly created name to the db. Adding addition upload controls is not a solution. If we need to make a desktop application that does the uploading, that is alright as well, but we'd like to keep it all in the asp.net environment.

View 1 Replies

Security :: Create User With File Upload?

May 18, 2010

I am trying to create a new user that includes a file upload. I want to write the file name to the database in a table called MemberInfo.

Here is my button code:

[Code]....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved