Vb.NET SaveAs not saving all Excel data

Posted Jan 01, 1970 12:00 AM

I have a very strange issue that I cannot seem to find an answer to online.

I have a VB.NET application that creates an Excel of data (roughly 42,542 rows in total) and the saves the file to a folder location & opens it on screen for the user.

The onscreen version & folder version is only showing 16,372 rows of data like it is being cut off.

When I go through debug I can see all the rows are being added & if I save manually in debug all the rows save. Some data seems to get lost on the system save.

I am taking data from 4 record sets & writing each set one after the other with specific headers for each block on the Excel sheet.

My save line is:

xlWBook.SaveAs(Filename:=sFileName, FileFormat:=Excel.XlFileFormat.xlExcel7)

Would anyone please have any ideas as to what this might be?

Many Thanks.

Tagged vb.net excel

Similar Topic Questions

Need help with error saving using Excel data in VB

I am trying to make a form in VB that provides access and allows end users to edit data in an Excel database. I have tried running it in XP and Windows 7 and get the same error. It runs...

Posted Jan 27, 2014 4:22 AM

VB.net loop to save multiple Excel files

I am using the following code to write values to a datatable and then export it to Excel. What I am trying to achieve now is to modify the code so that a separate Excel file is saved for each unique...

Posted Aug 23, 2014 6:44 AM

Export asp.net graphs or charts to excel using data grid and httpResponse

I need some help to export the charts and graphs from the asp:chartcontrol in the excel spread sheet using the httpResponse. I was able to export the data from the datalist to the excel spread sheet but was unable to...

Posted Dec 12, 2013 12:05 PM

Is there a way to build and output Excel data as XML stored in a variable instead of saving to a file with C#?

Using Interop Excel you can save to file but is there a way to simply extract xml data for a string variable without writing to file?...

Posted Dec 16, 2013 4:38 AM

Error importing and exporting excel data to vb.net, "Microsoft.Office.Interop.Excel.Application is not defined"

I am trying to run a file I downloaded to import and export data from excel. I downloaded from from the following site: http://www.sattsoft.com/sourcecodes/details/1/9/import-export-data-to-excel-using-vb-net.html When I run the file the error comes on the following lines Dim xlApp As...

Posted Jan 07, 2014 7:47 AM

Vb.net create project to check excel column data in sql and update in excel as exist or not exist

I am New in coding so please help to find out the way to make vb.net project to create vb.net project to check excel column data in SQL Server and update in excel as exist or not exist. I want to...

Posted Jan 14, 2014 11:45 AM

Asp.net application not saved data through wcf service

Here i am developed wcf service. and consumed in asp.net web application. my local site saved data properly into database with the help of wcf service.but when i host wcf on live server and also website.and after that i...

Posted Feb 14, 2014 7:06 AM

Reload aspx page after data is saved to excel

I am using below code for this purpose. public void Save(Literal L) { Response.ContentType = "application/ms-excel"; Response.AddHeader("content-disposition", "attachment;...

Posted Feb 22, 2014 3:26 AM

Force column to appear in 'Save to Excel' even if empty in FarPoint spread for VB.NET

I'm working with a FarPoint Spread grid in my VB.NET application and right now if the column has no data in it it will not show when I save the file to excel. There are other columns currently on...

Posted Apr 01, 2014 11:40 AM

Save HTML table data in database ASP.NET c#

I have a order form functionality and in that i have created a HTML table and allowing user to insert data in table row dynamically using jquery. Check attached image in this question. But the problem here is that i...

Posted Apr 28, 2014 3:40 AM

Save HTML table data as Excel while keeping the styling?

I got a page that generates a table of data based on the values provided in the form thanks to PHP script. I want to be able to save that table as Excel file, with background and text colors retained....

Posted May 05, 2014 5:58 AM

How to Connect an Oracle DB to Asp.net C# and save the data in data set?

I have a reporting tool project which have filtering therefore I would like to save the query in a string based on the filter and fill the data set then I will bind it with a grid view. my question is,...

Posted Jun 09, 2014 8:20 AM

How do you import Excel data to SQL Server using ASP.NET C# where the table's data does not start at the first row?

I want to import data from excel file to sql server database. Where data table does not start at first row in excel. Just like this picture: Here this my code when click button: protected void btnUpload_Click(object sender, EventArgs e) ...

Posted Jun 18, 2014 8:57 AM

How to save multiple datagridview data to a table in database in vb.net

I have a datagridview filled with a dataset and i want to store all the records it has to new table in database. i added a new column,("pos") to a dataset that fills the datagridview through a query so that...

Posted Jul 01, 2014 7:46 AM

ASP.NET MVC - Saving nested collection data

I am brand new to ASP.Net MVC. So, keep that in mind. :) I have a view with nested collections, with fields that get updated by the end user. I have the updated model data successfully coming back from an AJAX...

Posted Jul 09, 2014 1:57 AM

Import Excel data to sql database using asp.net

String filepath = FileUpload1.PostedFile.FileName; string filename = Path.GetFileName(filepath); string ext = Path.GetExtension(filename); String strConnection = "Data Source=;Initial Catalog=****;User ID=*****;Password=*****;Integrated Security=True"; string excelConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + filepath + ";Extended Properties=\"Excel 12.0 Xml;HRD=YES;IMEX=1;\""; OleDbConnection excelConnection = new OleDbConnection(excelConnectionString); OleDbCommand cmd = new OleDbCommand("Select [Emp ID],[Emp...

Posted Jul 30, 2014 7:04 AM

Excel data population using vb.net and mysql

Ok so basically, I have a vb.net application that has a datagridview in it. This datagridview is pulling data from a table in the mysql database. I also have a text box that the user can type something in and...

Posted Aug 12, 2014 11:16 AM

HTML code to take user form data save in Excel file on common dropbox account

What I am trying to do is take data from a user form from a website and save an Excel file in a specific dropbox account upon the end user clicking the submit button. If this can be done...

Posted Sep 19, 2014 5:44 AM

Edit/add/update excel data using asp.net webpage

I have a grid view that shows excel data. The excel file has only two columns Name and Value(no primary key). I am able to display excel data however not able to add data to it as well as edit...

Posted Oct 07, 2014 2:39 AM








Forgot Password
Reset my password!