Trying to upload excel file size 2 MB, when rows are more than 10000 then reading only 6000 rows and remaining rows are not added.

Mohammed Tajudeen 0 Reputation points
2023-01-25T05:26:17.8+00:00

I am using Asp.net, using FileUpload control trying to read excel file and converting them into StringWriter.

IF StringWriter data is processed directly in SQL query I can see all the rows are available but when I run through interface then I can see only limited rows are considered in the dataset.

Looks strange to me. Any idea.

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,374 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Mohammed Tajudeen 0 Reputation points
    2023-02-06T08:53:00.22+00:00
    asp.net design
       <asp:Label ID="Label9" runat="server" Text="File Name"></asp:Label>
                            <asp:FileUpload ID="xlsUpload" runat="server" Width="300px" />
                            <asp:Button ID="btnUpload" runat="server" class="btn btn-success" Width="80px" Text="Upload"/>
    
    CODE
    
     	    dt = xlsInsert(uploadedFile, "Sheet1")
                            dt.TableName = "BULKUPLOAD"
    
                            Dim sw As New StringWriter()
                            dt.WriteXml(sw, XmlWriteMode.IgnoreSchema)
    
                            ViewState("XMLDATA") = ""
                            ViewState("XMLDATA") = sw.ToString()
    
     dbConn.sqlCmd.Parameters.AddWithValue("@P_XmlData", ViewState("XMLDATA"))
      ds = dbConn.XcuteResult(str, CommandType.StoredProcedure, "SP_Name")
    

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  4. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  5. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more