Questions tagged [export-to-excel]

Use to tag questions about techniques to write an MS-Excel file (sheet, workbook, .xls, .xlsx) from various data sources (an SQL Query, a DataGrid, a DataGridView, a text file, etc).

The tag is widely used to let end users do more elaboration on data they get from information systems.

This tag is usually used in tandem with whatever technology is being used to do the exporting. For example, from or . You should never tag a question with without also tagging the question with the technology being used.

By using the tag, you are indicating that your question is about exporting data to Microsoft Excel formats from some other program or platform.

If your question is about exporting data as (Comma Separate Value files), tag it with instead.

3619 questions
220
votes
10 answers

Saving results with headers in SQL Server Management Studio

I am using SQL Server Management Studio. I wish to save the results of a query to an excel file. I choose "save as" and then save to CSV file which I can open in excel. All good except I am missing column headers, any ideas how I get them…
dublintech
  • 16,815
  • 29
  • 84
  • 115
184
votes
20 answers

Import and Export Excel - What is the best library?

In one of our ASP.NET applications in C#, we take a certain data collection (SubSonic collection) and export it to Excel. We also want to import Excel files in a specific format. I'm looking for a library I can use for this purpose.…
Jason Kealey
  • 7,988
  • 11
  • 42
  • 55
115
votes
11 answers

How to create an Excel File with Nodejs?

I am a nodejs programmer . Now I have a table of data that I want to save in Excel File format . How do I go about doing this ? I found a few Node libraries . But most of them are Excel Parsers rather than Excel Writers .I am using a Linux Server .…
geeky_monster
  • 8,672
  • 18
  • 55
  • 86
114
votes
3 answers

Export from pandas to_excel without row names (index)?

I'm trying to print out a dataframe from pandas into Excel. Here I am using to_excel() functions. However, I found that the 1st column in Excel is the "index", 0 6/6/2021 0:00 8/6/2021 0:00 1 4/10/2024 0:00 6/10/2024 0:00 2 4/14/2024 0:00 …
lsheng
  • 3,539
  • 10
  • 33
  • 43
109
votes
15 answers

Download Excel file via AJAX MVC

I have a large(ish) form in MVC. I need to be able to generate an excel file containing data from a subset of that form. The tricky bit is that this shouldn't affect the rest of the form and so I want to do it via AJAX. I've come across a few…
Valuk
  • 1,606
  • 3
  • 17
  • 23
100
votes
26 answers

Generating an Excel file in ASP.NET

I am about to add a section to an ASP.NET app (VB.NET codebehind) that will allow a user to get data returned to them as an Excel file, which I will generate based on database data. While there are several ways of doing this, each has its own…
Dan Coates
  • 2,002
  • 3
  • 17
  • 21
98
votes
14 answers

How can I export tables to Excel from a webpage

How can I export tables to Excel from a webpage. I want the export to contain all the formatting and colours.
124697
  • 22,097
  • 68
  • 188
  • 315
80
votes
8 answers

phpexcel to download

hello i am new to phpexcel, and i was wondering if there is some way send the excel i have created to the clients download without saving it on my server or to delete it right after he downloads it i am trying to create an "export button" on a page…
Dvir Levy
  • 8,018
  • 11
  • 39
  • 60
69
votes
4 answers

DataSet does not support System.Nullable<> in Export

I was trying to generate a Report using Export to Excell, PDF, TextFile. Well I am doing this in MVC. I have a class which I named SPBatch (which is the exact name of my Stored Procedure in my SQL) and it contains the following: public string…
Ms. B
  • 1,073
  • 6
  • 15
  • 26
57
votes
9 answers

Microsoft Office Excel cannot access the file 'c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx'

I have my code as follows :- Microsoft.Office.Interop.Excel.Application oXL = null; Microsoft.Office.Interop.Excel.Sheets sheets; Application excel = new…
Shubh
  • 6,693
  • 9
  • 48
  • 83
51
votes
2 answers

PHPExcel how to set cell value dynamically

How to set cell/column value dynamically using PHPExcel library? I am fetching result set from MySQL database and I want to write data in excel format using PHPExcel library. Looking at example $objPHPExcel->getActiveSheet()->setCellValue('A1',…
Asif
  • 833
  • 2
  • 14
  • 23
49
votes
5 answers

How to Freeze Top Row and Apply Filter in Excel Automation with C#

I have automation to create an Excel document from C#. I am trying to freeze the top row of my worksheet and apply filter. This is the same as in Excel 2010 if you select View > Freeze Panes > Freeze top row, and then after selecting top row Data >…
KBP
  • 1,500
  • 2
  • 14
  • 14
49
votes
10 answers

Format an Excel column (or cell) as Text in C#?

I am losing the leading zeros when I copy values from a datatable to an Excel sheet. That's because probably Excel treats the values as a number instead of text. I am copying the values like so: myWorksheet.Cells[i + 2, j] = dtCustomers.Rows[i][j -…
Tony_Henrich
  • 42,411
  • 75
  • 239
  • 374
43
votes
13 answers

How to export dataGridView data Instantly to Excel on button click?

I have 10k rows and 15 column in my data grid view. I want to export this data to an excel sheet o button click. I have already tried with the below code. private void btExport_Click(object sender, EventArgs e) { …
Jake
  • 1,560
  • 2
  • 17
  • 25
41
votes
8 answers

How to remove illegal characters so a dataframe can write to Excel

I am trying to write a dataframe to an Excel spreadsheet using ExcelWriter, but it keeps returning an error: openpyxl.utils.exceptions.IllegalCharacterError I'm guessing there's some character in the dataframe that ExcelWriter doesn't like. It…
user4896331
  • 1,637
  • 5
  • 16
  • 19
1
2 3
99 100