Click here to Skip to main content
15,888,803 members
Everything / Export

Export

export

Great Reads

by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
by Sarvesh Kumar Gupta
Export to Excel from GridView in C#
by Pasan Eeriyagama
This article focuses on a Very simple and Robust way to export Data to EXCEL
by ASP.NET Community
Here am trying to show how we can export an image to excel file.References Used: Microsoft.Office.Interop.Excel;Link for downloading the dlls

Latest Articles

by ToughDev
How to fix PDF Export Issues while using a Scriptcase Grid app
by PascalLandau
How to setup git-secret to store secrets directly in the repository
by IvanFeng
With AutoExcel, you can quickly import and export Excel without hard coding, and embrace changes.
by Mubin M. Shaikh
Walkthrough of the process for one of the industry best practices to export all SQL tables in Flat file format

All Articles

Sort by Score

Export 

24 Sep 2012 by Maciej Los
Have a look here:Fill/Retrieve data from PDF Form Fields using VB.NET and Excel File[^]Read Pdf Using Csharp[^]Shareware software: http://www.softpedia.com/get/Office-tools/PDF/PDF-to-Excel-Converter.shtml[^]Hand...
21 Mar 2015 by Amit Singh Baghel
A useful tip to export a Div to PDF (with Unicode support) with the help of NReco-PDF Generator for .NET (C#), JQuery and Handler in ASP.NET
30 Jun 2016 by Jochen Arndt
This has been asked and answered before:How to use c++ classes and functions in c#?[^]How do I DllExport a C++ Class for use in a C# Application - Stack Overflow[^]Some useful links:How to Marshal a C++ Class[^]Using Unmanaged C++ Libraries (DLLs) in .NET Applications[^]HowTo:...
3 Mar 2016 by MacParekh
hi all,I am working on Vb.net desktop application. My PDF file contain data in tabular formatI want that tabular data in to Excel. Is it possible?If yes then how can i achieve it?Is there any third party tool,dll(free) to achieve this functionality?Thanks in Advance
17 Sep 2021 by Richard Deeming
Quote: If System.IO.File.Exists(FilePath) Then Else System.IO.File.Create(FilePath).Close() End If You have created an empty file, which is not a valid Excel .xls file. When you try to open that file, you will get a warning from Excel. ...
21 Feb 2012 by Sarvesh Kumar Gupta
Export to Excel from GridView in C#
23 Jul 2012 by StianSandberg
I can recommend ClosedXml. It's open source and easy to use..You download it from codeplex and add reference in your project.var wb = new XLWorkbook();wb.Worksheets.Add(yourDataTable);wb.SaveAs("myExcelFile.xlsx");PS.. ClosedXml only supports .xlsx!
29 Apr 2013 by Leo Chapiro
Probably you have to have a declaration in your executable which uses DLL, like this:declspec( __dllimport ) extern int MyClass:: num;If it does not help, then add a static helper function for accessing that variable, for example:AFX_EXT_CLASS class CTest1{ static int...
1 Dec 2014 by OriginalGriff
Use XML: it's flexible, easy to use and even (relatively) human readable: http://msdn.microsoft.com/en-us/library/ms950721.aspx[^]
28 Oct 2015 by F-ES Sitecore
If you don't want to use any third-party tools then you'll need to learn the PDF format and how to create PDF documents yourself. .net has no in-built for PDF as it is a proprietary format so you're going to have to use some form of third party tool or do it yourself.
28 Oct 2015 by Zoltán Zörgő
HTML5 and PDF have two different view on the concept of "document". Please note, that PDF is based on PostScript, which is a complex programmable descriptive language for printers. The web for which html5, css3 and other things bootstrap relies on are living in a totally different world.So...
30 Jun 2016 by Philippe Mori
One solution would be to use Bridge pattern.Software design pattern - Wikipedia, the free encyclopedia[^]Bridge pattern - Wikipedia, the free encyclopedia[^]Thus you create a bridge that would allow you to simulate a managed C# class deriving from an unmanaged C++ class. Of course, you...
10 Nov 2016 by OriginalGriff
Why would you assume that i is valid for both dataGridView_auswahlen (row source) and table (row destination)?Since you are only transferring selected rows, unless your selection always starts with the first row and has no gaps, you will always get an exception.Instead of using an index,...
21 May 2020 by Garth J Lancaster
Add a reference & 'using' statement for System.IO.Compression.FileSystem ref : ZipArchive Constructor (System.IO.Compression) | Microsoft Docs[^] - using the 'stream constructor' gets-around having to add an entire directory using (FileStream...
24 Nov 2023 by Graeme_Grant
The best solution, IMHO, would be to create a custom log provider. You can then handle the logging as the log entries are added. I wrote an article for a custom Log Viewer control that has a custom Log Provider, one for each of the 4 common...
19 Feb 2012 by Sanjay K. Gupta
Datatable to excellprivate void ExportDataTable(DataTable dt) { string attachment = "attachment; filename=a.xls"; HttpContext.Current.Response.Clear(); HttpContext.Current.Response.AddHeader("content-disposition", attachment); ...
11 Mar 2012 by CRDave1988
OKI have fount something like this check this:http://jwcooney.com/2011/09/08/generating-excel-documents-through-html-xml-and-css-part-2/[^]
2 Jul 2012 by enhzflep
Hi, answered a similar question a while ago. It involved automating Excel from C++, _without_ MFC. Perhaps it will be of use to you? Though I would suppose that using winforms, you can import Excel objects. (Don't know - never done winforms)See the c++ solution here[^]
1 Nov 2012 by Pasan Eeriyagama
This article focuses on a Very simple and Robust way to export Data to EXCEL
11 Dec 2012 by Adam R Harris
You need to format the column in excel. have a look at this: http://social.msdn.microsoft.com/Forums/en-US/vsto/thread/fdc6cfb5-e7cc-466f-95f0-d8cd29f49d2d/[^]
25 Mar 2013 by Maciej Los
Probably, no matter on BodyFormat (rtf/html/text), the only way to achieve that is to use VBScript.RegExp library.To use it, you need to add reference in VBA editor as is shown here: simple-regular-expression-tutorial-for-excel-vba[^].Many useful information, you'll find here: Microsoft...
29 Apr 2013 by pengm
static export error: in test1.dll: xxx.h class AFX_EXT_CLASS CTest1 { static int num; } xxx.cpp int CTest1::num = 0; in a cpp of test2.dll: test2 is dependent test1.dll ... int i = CTest1::num; ... in a cpp of...
14 May 2013 by CHill60
To improve performance you need to minimise the use of the Excel COM interface.I would suggest converting your list of objects to a datatable first and then exporting that to excel ...Here is a generic way to convert a list to a datatable Converting a List to Datatable[^]and here's how...
14 May 2013 by Maciej Los
If you fetching data from database, the fastest way to export data is to use CopyFromRange()[^] method for MS Excel range.More about: How to transfer data to an Excel workbook by using Visual C# 2005 or Visual C# .NET[^]
11 Oct 2013 by ASP.NET Community
 Here am trying to show how we can export an image to excel file.References Used: Microsoft.Office.Interop.Excel;Link for downloading the dlls
29 May 2014 by NIKS SHINE
Uploading database of higher version of DBMS to the lower version one.
15 Jun 2015 by Mathew Soji
Refer the below links , might be helpful in resolving the issue.http://blogs.msdn.com/b/spike/archive/2008/07/23/ole-db-provider-microsoft-jet-oledb-4-0-for-linked-server-null-returned-message-unspecified-error.aspx[^]Export sql query result in excel...
15 Oct 2015 by DamithSL
you can get the all the files in image folder as below string[] filesindirectory = Directory.GetFiles(Server.MapPath("~/Image"));then create loop and add images to excel sheet Table table = new Table(); foreach(string img in filesindirectory) { ...
15 Nov 2015 by JatinKhimani
I want to implement Backup and Restore functionality for the user where they can take Backup of Certain data from the certain table and then they can restore it. I am working in desktop application in vb.net. Give you a scenario I have One Company Table in that Company id is primary Key ...
15 Mar 2016 by Patrice T
Should try something like that : private void Export_Click(object sender, EventArgs e) { //Copy grid to clipboard this.CopyGridToClipboard(dataGridView1); //Open the excel application and add a workbook ...
15 Mar 2016 by fourti_nabil
for those who may have the same problem and who ara interested; following the sample code fro working project : project to generate delphi DLL and export class instance : DDLL.zip - Google Drive[^]C++ project to use delphi DLL (2 version Static and Dynamic loading): DDLLUSERv2.zip - Google...
14 Sep 2016 by KarstenK
Here is some information about 7-zip.Use the command line tool for compressing your written files.
15 Feb 2017 by Peter Leow
Check this out: MySQL :: Issue creating export (backups)[^]
12 Mar 2017 by CHill60
See my solution to your earlier question How to get the exact value from website to excel?[^] The character showing in your code is not a single quote (Ascii 39)
20 Dec 2018 by Dave Kreskowiak
The bigger question is why are you putting all of this in an Excel workbook? It'll be practically unmanageable and unusable. If you're going to be manipulating data in Excel, the proper way to deal with such large data sets would be to have Excel connect to the database and grab the data it...
4 Dec 2019 by Richard MacCutchan
foreach (int i in arrRows) { for (int j = 0; j
24 Nov 2023 by PinkGoat_
So I have a button made from my xaml file (view), called Export. When the user clicks on it, the logs created during the run of the app get exported to Logs.txt. If there are Warnings, Errors or Exceptions, those will instead be created in...
24 Oct 2011 by rj45
Directly embedding .CSS ( or strip it out ) instead of href link (Excel export part 2)
19 Feb 2012 by Nikhil Dayalpawar
I have to export fetched data from database to excel sheet. How can i do..Here i have displayed data in html .. i have to export data in excel.public void Function(string fname) {strhtmlcontent.Append("FirstNameProduct NameClient NameAmountActivity Date");SqlConnection scon =...
19 Feb 2012 by Kiirrii
Try this.... protected void Button1_Click(object sender, EventArgs e) { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=GridView1.xls"); Response.Charset = ""; Response.ContentType = "application/vnd.xls"; ...
19 Feb 2012 by Mahmud Hasan
1st of all I would request you to post your questions with better code formatting so that it looks more readable. I can see in your code data retrieval and display mechanism is tried to implement in the same place. Which is not a good practice. You should think like the following:1. You...
11 Mar 2012 by Ariel Riyo
Hello guy! good DAY!Im having a problem in the Page setup when i export my table in excel. I need to automatically assign the paper layout to landscape when i click my export button.I have no problem in exprting my html table to excel i need just to assign may paper to a landscape form...
11 Mar 2012 by Abhinav S
Export HTML table to Excel with grid lines[^] and the discussion here[^] might help you out.
12 Mar 2012 by Shivapragasam
send your HTML table id to the parameter 'ctl'public void exportGridToExcel(Control ctl) { string attachment = "attachment; filename=etrack_excel_export.xls"; HttpContext.Current.Response.ClearContent(); ...
18 Mar 2012 by Shivapragasam
how to export a page to pdf. Note that that page is having controls developed by jquery also those controls are generated dynamically.
19 Mar 2012 by Shivapragasam
Hi, how to export a gridview to PDf with merged cells. I have merged the cells based on the value. But when i export the gridview into pdf using itextsharp its expoting the grid into table format. Its not exporting the merged cells. please help me.Thank you guys.
4 Jul 2012 by Nanju.84
Hi I have large content inside scrollable panel in windows form and i want to export all the content inside that panel to image .currently i am using below code but it saves only active form data.please help to save all the content.this.treePanel.Dock =...
12 Jul 2016 by bluesathish
Dear All,I'm having one datatable, i want to export this datatable's values to .xls file(Excel file) without referring the excel assemblies because i didn't install MS Excel in my pc but instead i've Open office software to process xls files.So anyone give me the idea how to export my...
9 Aug 2012 by pradiprenushe
Add one button for exportAdd on page Export.aspx.in button clickCT.SaveImage("D:\\MyChart.png", ChartImageFormat.Png);this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Export" + DateTime.Now.ToString(), "window.open('Export.aspx?Image=" +MyChart +...
9 Oct 2012 by snamyna
Hye..Usually when I want to export data from database to excel using vb, I used this method but when it comes to large amount of data (which will generate approx 16k rows and 100 columns header), this method would not be suitable.How can I modify my code to suit my requirement?Thanks...
18 Nov 2012 by mcrawley
I would like to reduce the number of C++ class methods exported from a DLL that show up in the list of exported symbols with mangled names. This is an effort to reduce the size of C++ assemblies. Virtual functions implemented/overriden in a derived class can be accessed from a reference to...
18 Nov 2012 by Eugen Podsypalnikov
Maybe it would be possible to export only some interfaces(with needed functionality-aggregation(s) by (smart-)pointers) ? :)// Header to be "exported" :)class CInsideClass; // public CInsiderBase, public ...typedef std::auto_ptr CSafeInsider;class...
11 Dec 2012 by Naveen Nallavelli
I am trying to export some values to Excel. I am able to export values like 1.23, 5.45,9.25 successfully with decimal values by specifying dataFormatString = {0:N2}. But the same is not working when I export 0.00, the decimal values 00 after the period are removed . So I am just seeing '0'...
22 Dec 2012 by ChrisTopherus
I did not had a situation like that but i coded a lot on the interopthing. in a lot of situations, my solution was to programmatically call the vba codemodule via:Microsoft.Vbe.Interop;hope this helps...
3 Jan 2013 by coffeenet
Hi,I will show my code first to make explaining easier:Hi,I will show my code first to make explaining easier://EXE__declspec(dllimport) exportedDLLfunc(int i):void exeFunc(){ for(int i=0; i
3 Jan 2013 by nv3
This could be a timing problem in the initialization sequence. When you call exeFunc, the gSome array might not be initialized yet.When calling anotherdllfunc, it is guaranteed that gSome will have been initialized by that time. That is why you see different values, but the same...
10 Jan 2013 by cekshanu
Im doing a windows application on store management for a company, I have exported my datagrid successfully to excel but I would like to know if there is a way to set a header to the document similar to a company letter head with its name, logo and address.The code I used to export my datagrid...
10 Jan 2013 by RDBurmon
Read last answer in this blog . Very good explanation over your requirementhttp://stackoverflow.com/questions/9410401/adding-custom-header-to-the-excel-file[^]Accept and vote if found helpful--RDBurmon
5 Feb 2013 by Don Cornell
I want to document our Workflows and I am having difficulty being able to export and then extract the uidata portion of them.I use the CRM Customization export and then try to filter through the output to find parts of them to document.I have managed to collect the JavaScript information...
13 Mar 2013 by Am Gayathri
I want to export data in to excel from grid. My grid contains image.Am using the following code, private void CreateXL() { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=xxxxxxxt.xls"); Response.Charset = ""; ...
13 Mar 2013 by N ManojKumar
Hi Kavitha,I think the below link will solve your problem. Take a look into that.http://www.aspsnippets.com/Articles/Export-GridView-with-Images-to-Word-Excel-and-PDF-Formats-in-ASP.Net.aspx[^]Regards,Manoj
20 Mar 2013 by Maciej Los
Start here: Welcome to MS Outlook 2003 VBA Language Reference[^], but before you'll start do anything, read about security (left window). Next, have a look here: MailItem Object[^].Example code from above site:Set myOlApp = CreateObject("Outlook.Application")Set myNamespace =...
20 Mar 2013 by chenduran10
HiIm new in VBA and need help.I have in Outlook a folder with Statusmails.Every day must every employee send a Statusmail end of the day, what they did on that day.I want to export this Emails to Excel for a better View.The Email has always the same format.The Table...
20 Mar 2013 by sofia3
Dear all, I am trying to write a dynamic utility which can export the datatable content to a PDF file without using 3rd party dll in a Windows Application. Please help. Thanking you in advance.
20 Mar 2013 by Prasad Khandekar
Hello Sofia,I will recommend you to go through following articles published here on CodeProject to know more about how it can be done. Using a third party toolkit will be much beneficial rather than re inventing the wheel.Creating PDF documents with iTextSharpGios PDF .NET libraryPDF...
24 Mar 2013 by chenduran10
Hi Im new in VBA and need help. I have in Outlook a folder with Statusmails. Every day must every employee send a Statusmail end of the day, what they did on that day. I want to export this Emails to Excel for a better View.The table in the Email has always the same...
25 Mar 2013 by James Medalla
First of all, thank you for your time in reading this question :)Now, i have tried searching in google yet i don't understand the codes or my skills aren't sufficient.My question is: How can i export my dataset "SADDatabaseDataSet" or my Database or my DataGridViews to my MS Excel 2007...
25 Mar 2013 by Santhosh Kumar Jayaraman
You have to check this article if you are using web application.Export DataTable to Excel with Formatting in C#[^]
5 Apr 2013 by Priyanka Arora 2012
Hello All,Suggest me,how can i import and export our excel file from database in php
5 Apr 2013 by Zoltán Zörgő
Just a note: why have you tagged your post with XML?This might help you: http://phpexcel.codeplex.com/wikipage?title=Features&referringTitle=Home[^]
6 Apr 2013 by Member 8309007
A few years back when researching this problem I ran across a program that came close to being a perfect solution. It would not work for what I needed but I showed me some possibilities that I would like to follow up on. Unfortunately, I cannot find it now, nor do I remember the name.I a...
7 Apr 2013 by Garth J Lancaster
Independentsoft have an offering that reads .pst files http://www.independentsoft.com/pst/index.html[^]... so, if you have access to the exchange pst files this may be what you want - Im not sure about creating .pst files given access to outlook/exchange - for example, I use...
8 Apr 2013 by Wassim Brahim
How To export virtualized DataGrid to Excel ??
9 Apr 2013 by venkatesun
Hi ,I have a requirement to export the chart to Excel and PDF.I can able to export the chart with 2 axis to pdf using itextsharp and SQLDATASOURCE. The thing is I have 3 axis(X,Y,Secondary Y) Chart so I couldn't able to export the chart to PDF/Excel.And I am using Sql server 2008 to pull...
9 Apr 2013 by Member 2707515
Imports System.Web.UI.DataVisualizationImports System.Web.UI.DataVisualization.ChartingDim srs As Series = chtTotal.Series.Add("srsTotal") Dim lgn As Legend = chtTotal.Legends.Add("legTotal") Dim ds As DataSet = Bugs.GetCallListForReviewChartPie(Session("user_id"),...
24 Apr 2013 by karthi4021
HI In my ASP.net Application i did the excel Export from grid view by using EPPLUS DLL. before save that excel i want to delete the file excel if already exists in the folder.but first time the excel was Exported on the second time excel generation that excel file was not able to delete and...
29 Apr 2013 by JackDingler
The issue is likely that because you have a DLL importing symbols from another DLL, and that all of the symbols are being marked for export as du[DE] explained above.What you need are conditional declarations dependant on each DLL, so that they won't be mistakenly interpreted incorrectly by...
3 May 2013 by Miezitis
Hello; Our product uses FileHelpers V2.0.0, and to expand its market we need to perform Export Control for our product software. Is there an ECCN and/or CCATS or any other export control designation for this component? If not, does this component perform any encryption (other than that...
28 May 2013 by Yu Mon
My charts automatically exported into a file. I don't know how to solve that problem. Because export coding is not included in my application.
7 Jun 2013 by Am Gayathri
How can i align my excel columns while exporting to excel?i wanna left align my fields while exporting to excel.??
7 Jun 2013 by vangapally Naveen Kumar
TRY LIKE THISworksheet.Range("A1", "A1").Style.HorizontalAlignment =Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignCenter;i hope it will help you.
12 Jun 2013 by AhmedYehiaK
Hi everyone I have a gridview with a custom style and row colors and i want a stable method to export this grid data to excel file with the same format.Thanks in advance :)
12 Jun 2013 by Dave Kreskowiak
You're going to have to either use the Excel object model or the OpenOffice SDK, depending on the version of Excel you're talking about. The Excel object model is not known for it's speed and the OpenOfficeSDK has a bit of a steep learning curve to use.In either case, you'll be creating the...
8 Jul 2013 by nvikas7
I am using the below code // Declare variables and get the export options. ExportOptions exportOpts = new ExportOptions(); ExcelFormatOptions excelFormatOpts = new ExcelFormatOptions(); ...
27 Aug 2013 by Member 10212711
public partial class Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { BAL objBAL = new BAL(); GridView1.DataSource = objBAL.associateDetails(); GridView1.DataBind(); } ...
27 Aug 2013 by Thomas ktg
There is an article relating to your post. Please go through this i hope it helps.Export DataSet to Multiple Excel Sheets[^]
6 Sep 2013 by SharathNaik1990
Hello,I want to Export the SVG Image Created on my web page into Excel.I am using MVC4 architecture and razor web pages. Scenario: I have a grid and a SVG chart in the web page.I could able to import the chart data into the Excel file.Please give me suggestions about how to import...
6 Sep 2013 by RedDk
Copy and paste this macro into module through VBA interface:Sub svgImport()'' svgImport Macro' importing .svg via fixed width text from .svg usg Import dialog in XL'' sn.svg is svg file'' svgImport.xls is target XL spreadsheet' With...
21 Sep 2013 by Trushal19
Hi,I need to export the datagrid in only MSExcel not in CSV. Datagrid is populated through PagedviewCollection.Can someone please help? Its urgent!!!
21 Sep 2013 by ridoy
Check this article:Export Silverlight DataGrid to Excel XML/CSV[^]
25 Sep 2013 by Maciej Los
Please, read the comment of RedDK and follow the link provided by Him:RedDK wrote:Possibly the -C option needs to be set. Specific codepage can be input, if its not ACP, OEM, or RAW. Isn't there a way to say it in TSQL also, using same keywords, somewhere in the " " string?See...
30 Sep 2013 by Omkaara
datagridview to pdf export i got the partial solution with itextSharpthe problem with that is page orientation landscape not available please help
30 Sep 2013 by MohanKrishna.Kota
If u want landscape mode then set it in the page settingthe code looks like thisDocument doc = new Document(PageSize.
30 Sep 2013 by londhess
You are using iTextSharp.then please try below property.document is the object of Document.document.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());
30 Sep 2013 by Rakesh Meel
visit here...http://www.aspsnippets.com/Articles/Export-GridView-to-PDF-and-send-PDF-File-as-email-attachment-in-ASPNet.aspx[^]orhow to export/convert datagridview to pdf format[^]orhow export datagridview vbnet to pdf file[^]
30 Sep 2013 by mkapoen
Hello,I have made some working SSIS export functionality to Excel.The results appear in multiple sheets. So far, so good.One of the sheets is named “Onboarding”.Now in this sheet “Onboarding” I pre-defined a table: ‘tblOnboarding’. I want the export-results in this table....
6 Oct 2013 by Charlesirwin1810
I have a XMAL Page with a single chart control, i load the charts based on user selection from the list box ChartCollections,What i need is : Need to Print a PDF files with Charts based on User SelectionIssue is i have another listbox which has the same details ChartCollections, and user...
11 Oct 2013 by ASP.NET Community
In this Article we are going to read and understand how in a web application we can export a gridview data into Excel file. As many times in real
11 Oct 2013 by ASP.NET Community
Sometimes we needs to export data to file with applicable styles...Here am trying to show an simple example... .aspx page
19 Oct 2013 by thatraja
Check theseColumn Settings Not Working When Exporting From Crystal Reports To Excel[^]Exporting to Microsoft Excel[^]Exporting to Excel in Crystal Reports .NET - Perfect Excel Exports[^]