Tag: asp.net

Insert value beside imported data from Excel into SQL Server via vb.net

I am facing an issue as below: I’m creating a daily performance management tool, so I need to import Excel files into a SQL server table and I need to import these values with a specific date to be picked from a textbox control. I can import normally from Excel into the database but can’t […]

export to excel from ajax request asp.net MVC kendo UI

I am working on a asp.net MVC with kendo UI. I want a custom button to install the data from a specific date into Excel. I cannot use the “.Excel” in the grid because I need to filter the data before I install them. I tried to connect to a method with ajax request: toolbar.Template( […]

Getting a “Failed – Network Error” for downloads in chrome the first time. Resume succeeds

We have a simple data grid on our web page and we provided an “Export To Excel” functionality. IE and firefox work perfect. But in chrome, we get the “Failed – Network Error” in the horizontal bar (downloads panel) at the bottom of the page when we click the button. If I click on it […]

Microsoft OLEDB 12.0 not registered on local machine

I have created an ASP.net web application which reads data from excel sheet and displays it in jquery data table. After taking a build and deploying it on IIS 8, it works fine on my machine. But once I deploy it on another machine which has 32 bit office installed, there is Microsoft.OLEDB 12.0 driver […]

Generating a huge Excel file in chunks with low memory consumption

I have an ASP.NET web API, where the user supplies some parameters and an Excel file is generated on-the-fly by the OpenXML library. The row data is based on data from an SQL database, and the resulting Excel file could potentially be huge (100k+ rows). Creating the whole file in memory leads to OutOfMemoryException. The […]

Selecting Through only visilble Excel rows through vb/asp.net

is there a way to select visible columns in excel using vb.net/asp.net. I have this project that needs the certain rows of excel to be selected without selecting the hidden one. i have this query Select [BONUS],[PROGRAM], [COST/30s],[TARPs],[SPOTS – 30s ],[TOTAL COST – 30s ],[TOTAL TARPs – 30s ],[COST/15s],[SPOTS – 15s],[TOTAL COST – 15s ],[TOTAL […]

Import excel file in asp.net with multiples worksheets

I am currently working on c# asp.net file and the following code is about importing an excel file with multiple worksheets. string FileName = Path.GetFileName(FileUpload1.PostedFile.FileName); string Extension = Path.GetExtension(FileUpload1.PostedFile.FileName); string FolderPath = ConfigurationManager.AppSettings[“FolderPath”]; string FilePath = Server.MapPath(FolderPath + FileName); FileUpload1.SaveAs(FilePath); OleDbConnection oconn = new OleDbConnection(@”Provider=Microsoft.Ace.OLEDB.12.0;Data Source=” + FilePath + “;Extended Properties=Excel 12.0;”); //importing student details […]

How to keep numeric formats after exporting to excel sheet

Because of losing the formatting of my numeric fields in Telerik report when exporting to Excel sheet , i follow Design Considerations for Excel Rendering to fix my problem . And i use Custom Formatting for the numeric fields like this : _(* #,##0.00_);_(* (#,##0.00);_(* “-“??_);_(@_) But the result after Exporting is : [$-1010C01]”_”(“*” #,##0.00″_”);”_”(“*” […]

Not able to get all the values from excel using Microsoft.ACE.OLEDB.12.0 (getting Blank values)

I have the following code (Responsible for reading Uploaded Excel File ) DataSet ds = new DataSet(); string ConnectionString = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + filePath + “;Extended Properties=\”Excel 12.0;\””; using (OleDbConnection conn = new System.Data.OleDb.OleDbConnection(ConnectionString)) { conn.Open(); using (DataTable dtExcelSchema = conn.GetSchema(“Tables”)) { string sheetName = dtExcelSchema.Rows[0][“TABLE_NAME”].ToString(); string query = “SELECT * FROM [” + sheetName […]

How to Import Openoffice calc Spreed sheet data to sql server using sqlbulkcopy without using oledb connection in asp.net

In my web application, I have some Excel sheets i need to insert it into database here i am using sqlbulkcopy to insert data into sqlserver data base. i am used this code: using System; using System.Data; using System.IO; using System.Data.OleDb; using System.Configuration; using System.Data.SqlClient; public partial class _Default : System.Web.UI.Page { OleDbConnection Econ; SqlConnection […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.