3,628 questions
235
votes
10
answers
277k
views
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 ...
182
votes
20
answers
213k
views
Import and Export Excel - What is the best library? [closed]
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 ...
134
votes
11
answers
293k
views
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 ...
127
votes
4
answers
312k
views
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 ...
110
votes
15
answers
331k
views
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 ...
99
votes
26
answers
64k
views
Generating an Excel file in ASP.NET [closed]
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 ...
98
votes
14
answers
291k
views
How can I export tables to Excel from a webpage [closed]
How can I export tables to Excel from a webpage. I want the export to contain all the formatting and colours.
80
votes
8
answers
236k
views
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
...
75
votes
4
answers
63k
views
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) ...
60
votes
10
answers
92k
views
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 Microsoft.Office.Interop.Excel.Application();
...
53
votes
10
answers
301k
views
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:
...
51
votes
2
answers
157k
views
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
$...
49
votes
5
answers
90k
views
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 ...
46
votes
13
answers
237k
views
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, ...
44
votes
9
answers
54k
views
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 ...
43
votes
4
answers
93k
views
How to export a PostgreSQL query output to a csv file
I'm having problem exporting my PostgreSQL output from a shell to a csv file.
My SQL script is called script.sql.
I typed the following command in my shell:
psql congress -af script.sql &> ...
41
votes
7
answers
108k
views
Google spreadsheet direct download link for only ONE sheet as excel
I was wondering if its possible to download say only sheet 1 of a google spreadsheet as excel? I have seen few SO posts that show the method to export the WHOLE sheet as excel, but I need to just ...
39
votes
3
answers
46k
views
Multiline text in Excel cells
I'm trying to write multiline text to excel cells.
cell.setCellValue("line1 \n line2");
But when I open the document, I see only one line until I double-click it for editing, then it becomes two-...
38
votes
7
answers
224k
views
Export data to Excel file with ASP.NET MVC 4 C# is rendering into view
I am having trouble exporting data to Excel. The following seems to render the gridview into my View, instead of prompting the user to open with Excel, which I have installed on my machine.
Public ...
38
votes
4
answers
139k
views
Cannot create an instance of OLE DB provider Microsoft.Jet.OLEDB.4.0 for linked server null
I am trying to export from my Table data into Excel through T-SQL query. After little research I came up with this
INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0',
'Excel ...
36
votes
8
answers
125k
views
How to Export JSON to CSV or Excel - Angular 2
Say my json is like this:
var readyToExport = [
{id: 1, name: 'a'},
{id: 2, name: 'b'},
{id: 3, name: 'c'}
];
How can I export this JSON into CSV or Excel file in Angular2?
The browser ...
35
votes
3
answers
64k
views
How to export complete Google Analytics historical data? [closed]
I was given a few days to export all the historical data from a Google Analytics account before access will be shutoff. Important to note that you cannot migrate historical data (at the time of this ...
33
votes
10
answers
117k
views
How to get named excel sheets while exporting from SSRS
Whenever a single page report is exported to excel, sheet in excel is named by the report name.
If a report has multiple pages, the sheets are named as sheet1, sheet2,....
Is there any way to specify ...
32
votes
6
answers
506k
views
Export SQL query data to Excel
I have a query that returns a very large data set. I cannot copy and paste it into Excel which I usually do. I have been doing some research on how to export directly to an Excel sheet. I am running ...
30
votes
7
answers
58k
views
Pandas - Writing an excel file containing unicode - IllegalCharacterError
I have the following code:
import pandas as pd
x = [u'string with some unicode: \x16']
df = pd.DataFrame(x)
If I try to write this dataframe as an excel file:
df.to_excel("test.xlsx")
Or, if I try ...
30
votes
5
answers
33k
views
Rails - Export records to downloadable excel file using axlsx gem (Keep MVC)
I have installed the axlsx gem successfully from https://github.com/randym/axlsx
Here is my controller code that I used to create an excel file through this gem.
But nothing happen with this code ...
28
votes
4
answers
9k
views
generating/opening CSV from console - file is in wrong format error
I am writing out a comma separated file using a console app, and than using Process to open the file. It's a quick and dirty way of dumping results of a query into excel.
for a while this worked ...
25
votes
3
answers
180k
views
Export tables to an excel spreadsheet in same directory
I have two tables in my access database that I want to be able to export to excel.
I can do it by opening the table and then doing File->Export... and then choosing the format and typing in the ...
24
votes
4
answers
63k
views
How do I insert tabs into strings for a C# console application? [closed]
This console application will write .txt files to disc.
User wants to import these .txt files into Excel such that they are formatted correctly, so I plan to use tabs.
I keep getting this nonsense "...
24
votes
4
answers
16k
views
Direct downloading a xls file without writing it to the directory by Spreadsheet gem
I am using this Spreadsheet gem to export xls file.
I have the following codes in my controller:
def export
@data = Data.all
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet :...
23
votes
7
answers
73k
views
Excel Range.BorderAround(), Border is always black
This is the code I am using:
rngData.BorderAround(Excel.XlLineStyle.xlContinuous,
Microsoft.Office.Interop.Excel.XlBorderWeight.xlThin,
Microsoft.Office.Interop.Excel.XlColorIndex....
20
votes
1
answer
18k
views
pandas cut: how to convert categorical labels to strings (otherwise cannot export to Excel)?
I use pandas.cut() to discretise a continuous variable into a range, and then group by the result.
After a lot of swearing because I couldn't figure out what was wrong, I have learnt that, if I don't ...
20
votes
1
answer
68k
views
Any open source / free library for handling Excel (both *.xls and *.xlsx) files? [duplicate]
I know of some open source libraries for handling with Excel files but these are for only *.xls or *.xlsx, for example NPOI is for *.xls, EPPlus and ClosedXML are for *.xlsx. I don't want to use ...
19
votes
3
answers
41k
views
Trying to access array offset on value of type int { DefaultValueBinder.php line 82 }
I have an export to excel button which downloads excel file.
However when i click it shows me error as Trying to access array offset on value of type int
My code is this:
public static function ...
19
votes
9
answers
32k
views
Which gem support Import/Export to xlsx file in ruby [closed]
I need to read and write to Excelx file with ruby code,
Tried with spreadsheet it does not support xlsx format,
Roo is also to read the file and not write to xlsx.
Is there any gem/plugin which will ...
18
votes
2
answers
40k
views
Export JSON to CSV or Excel with UTF-8 (e.g. Greek) encoding using JavaScript
I am trying to export and download a JSON object to CSV file and I have problem with Greek characters. My code works; it is not perfect, but it works.
The problem is that Greek characters looks like ...
18
votes
1
answer
9k
views
The function to_excel of pandas generate an unexpected TypeError
I created a dictionary of pandas dataframe:
d[k] = pd.DataFrame(data=data[i])
So I assume that d[k] is a correct pandas dataframe.
Then
for k in d.keys():
d[k].to_excel (file_name)
Then I have ...
18
votes
8
answers
56k
views
Exporting to excel from Delphi without having excel
I'm looking to export data to excel from Delphi without having to own a copy of excel, is this possible?
N.B. CSV will not do.
18
votes
4
answers
70k
views
the file you are trying to open is in a different format than specified by the file extension in Asp.Net
the file you are trying to open is in a different format than specified by the file extension c# error when trying to open file in excel.
Here is my code
public ActionResult Export(string filterBy)
{
...
16
votes
5
answers
101k
views
Exporting data from php to excel
I need to export data from php (data retrieved from mysql database) to excel. I'm using Zend Framework. I need to do some changes to my data before exporting to excel. Actually, what I really need is ...
16
votes
2
answers
4k
views
ClosedXML - Creating multiple pivot tables
I am trying to export some data to an excel sheet S1 whose data would be shown as Pivoted views in the next two sheets S2 and S3. I am able to create a single pivot and it works perfect. But when I ...
15
votes
2
answers
26k
views
How can I export a JSON object to Excel using Nextjs/React?
I have an endpoint that retrieves a json object like the following:
"data": [
{
"id": 1,
"temaIndicador": "Indian",
"codigo": "001",
"...
15
votes
2
answers
16k
views
how to save xls file as xlsx file using NPOI c#?
I'm using NPOI to open XLS file, then add some modifications to the XLS file.
at the end i want to save it as XLSX file.
i'm using this code to save it as XLS file: ...
14
votes
4
answers
96k
views
Export HTML Table to Excel using ASP.NET
I have an html table (Not Gridview) and that has no proper Header and rows. Instead it has customized structure and data. I want to export this table to Excel. How can I do using ASP.NET?
The labels ...
13
votes
3
answers
40k
views
How to generate an Excel file with Rails?
I was searching Ruby toolbox for a popular, well-supported tool to generate XSLX (Excel 2007 and on) document, but I didn't manage to find anything.
I also spent a good amount of time searching on ...
13
votes
5
answers
142k
views
How to write Python Array into Excel Spread sheet
I am trying to write following array into Excel spreadsheet using Python:
array = [ [a1,a2,a3], [a4,a5,a6], [a7,a8,a9], [a10, a11, a12, a13, a14]]
At spreadsheet array should look:
a1 a4 a7 a10
...
13
votes
7
answers
82k
views
How can I write data into an excel using PHP?
Is it possible to append content to an .xls file using PHP fwrite()?
When I try this using fwrite(), the resulting file causes an error message in Excel 2007.
Is there a specific separator I can use ...
13
votes
7
answers
43k
views
org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save
I'm facing org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save:an error occurs while saving the package : The part /docProps/app.xml fail to be saved in the stream with ...
13
votes
3
answers
12k
views
Open source component or unit for exporting Delphi TDataSet to native XLS without Excel installed [closed]
Do you possibly know about the existence of a free and open sourced Delphi code to export TDataSet to native XLS format? The question was previously asked here, yet I am looking for a free solution.
...
13
votes
1
answer
15k
views
How to set page layout break on worksheet using EPPlus
Is there a way to set specify where to break the page using EEPlus? I have the following code that sets the printer properties but haven't found a way to set a break point on a certain column.
// Set ...