473,545 Members | 2,388 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Export to Microsoft Excel

Hi everyone!

I have a question about exporting data to Microsoft Excel.

I am writing program in C# and have to export some data to excel workbook. It works very good using OLE technology, but it requires Microsoft Excel installed on every machine with my program. It is not quite convenient to do so.

Is there another way to export data to Excel, or how simply create file of Microsoft Excel format from my program (of cause, the format of Excel (.xls) file I do not know).

Thanks.
Igor.
Nov 16 '05 #1
5 8658
I'm not sure whether the Excel drivers will be there on the target machine
if Excel is not installed. You have two options

1. If the Excel OLEDB drivers come with Windows, then you can distribute a
blank Excel worksheet and then use it as the target of your data (as the
drivers can't create Excel files)

2. You could try using CSV as a format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:39******** *************** ***********@mic rosoft.com...
Hi everyone!

I have a question about exporting data to Microsoft Excel.

I am writing program in C# and have to export some data to excel workbook. It works very good using OLE technology, but it requires Microsoft
Excel installed on every machine with my program. It is not quite convenient
to do so.
Is there another way to export data to Excel, or how simply create file of Microsoft Excel format from my program (of cause, the format of Excel
(.xls) file I do not know).
Thanks.
Igor.

Nov 16 '05 #2
I'm not sure whether the Excel drivers will be there on the target machine
if Excel is not installed. You have two options

1. If the Excel OLEDB drivers come with Windows, then you can distribute a
blank Excel worksheet and then use it as the target of your data (as the
drivers can't create Excel files)

2. You could try using CSV as a format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:39******** *************** ***********@mic rosoft.com...
Hi everyone!

I have a question about exporting data to Microsoft Excel.

I am writing program in C# and have to export some data to excel workbook. It works very good using OLE technology, but it requires Microsoft
Excel installed on every machine with my program. It is not quite convenient
to do so.
Is there another way to export data to Excel, or how simply create file of Microsoft Excel format from my program (of cause, the format of Excel
(.xls) file I do not know).
Thanks.
Igor.


Nov 16 '05 #3
Thank you for your responce.

But, i think, that Excel OLEDB driver would not help me. What i want, is to create Microsoft Excel (.xls) file without any help from Excel program. Of cause, i do not know the internal structure of this file type.

What is the CSV format, i never worked with it.

Thanks.
Igor.

"Sriram Krishnan" wrote:
I'm not sure whether the Excel drivers will be there on the target machine
if Excel is not installed. You have two options

1. If the Excel OLEDB drivers come with Windows, then you can distribute a
blank Excel worksheet and then use it as the target of your data (as the
drivers can't create Excel files)

2. You could try using CSV as a format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:39******** *************** ***********@mic rosoft.com...
Hi everyone!

I have a question about exporting data to Microsoft Excel.

I am writing program in C# and have to export some data to excel

workbook. It works very good using OLE technology, but it requires Microsoft
Excel installed on every machine with my program. It is not quite convenient
to do so.

Is there another way to export data to Excel, or how simply create file

of Microsoft Excel format from my program (of cause, the format of Excel
(.xls) file I do not know).

Thanks.
Igor.


Nov 16 '05 #4
I don't think that using the OLEDB driver counts as 'using Excel' so you
might want to take a look at that as an option.

CSV stands for Comma-Separated-Values and as its name implies contains
fields separated by commas. Its a pretty universal file format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:07******** *************** ***********@mic rosoft.com...
Thank you for your responce.

But, i think, that Excel OLEDB driver would not help me. What i want, is to create Microsoft Excel (.xls) file without any help from Excel program.
Of cause, i do not know the internal structure of this file type.
What is the CSV format, i never worked with it.

Thanks.
Igor.

"Sriram Krishnan" wrote:
I'm not sure whether the Excel drivers will be there on the target machine if Excel is not installed. You have two options

1. If the Excel OLEDB drivers come with Windows, then you can distribute a blank Excel worksheet and then use it as the target of your data (as the
drivers can't create Excel files)

2. You could try using CSV as a format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:39******** *************** ***********@mic rosoft.com...
Hi everyone!

I have a question about exporting data to Microsoft Excel.

I am writing program in C# and have to export some data to excel

workbook. It works very good using OLE technology, but it requires Microsoft Excel installed on every machine with my program. It is not quite convenient to do so.

Is there another way to export data to Excel, or how simply create
file of Microsoft Excel format from my program (of cause, the format of Excel
(.xls) file I do not know).

Thanks.
Igor.


Nov 16 '05 #5
I'll try to work with OLEDB driver.

Of cause, CSV format is simple, but it is not useful for my program.

Thanks.
Igor


"Sriram Krishnan" wrote:
I don't think that using the OLEDB driver counts as 'using Excel' so you
might want to take a look at that as an option.

CSV stands for Comma-Separated-Values and as its name implies contains
fields separated by commas. Its a pretty universal file format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:07******** *************** ***********@mic rosoft.com...
Thank you for your responce.

But, i think, that Excel OLEDB driver would not help me. What i want, is

to create Microsoft Excel (.xls) file without any help from Excel program.
Of cause, i do not know the internal structure of this file type.

What is the CSV format, i never worked with it.

Thanks.
Igor.

"Sriram Krishnan" wrote:
I'm not sure whether the Excel drivers will be there on the target machine if Excel is not installed. You have two options

1. If the Excel OLEDB drivers come with Windows, then you can distribute a blank Excel worksheet and then use it as the target of your data (as the
drivers can't create Excel files)

2. You could try using CSV as a format

--
Sriram Krishnan
Microsoft Student Ambassador
http://www.dotnetjunkies.com/weblog/sriram
"Igor" <Ig**@discussio ns.microsoft.co m> wrote in message
news:39******** *************** ***********@mic rosoft.com...
> Hi everyone!
>
> I have a question about exporting data to Microsoft Excel.
>
> I am writing program in C# and have to export some data to excel
workbook. It works very good using OLE technology, but it requires Microsoft Excel installed on every machine with my program. It is not quite convenient to do so.
>
> Is there another way to export data to Excel, or how simply create file of Microsoft Excel format from my program (of cause, the format of Excel
(.xls) file I do not know).
>
> Thanks.
> Igor.


Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3754
by: Maria L. | last post by:
Hi, I need to export the content of a DataGrid (in Windows application in C#), into an Excel spreadsheet. Anyone knows how to do this? Any code snippets would help! thanks a lot, Maria
4
33447
by: Hans [DiaGraphIT] | last post by:
Hi! I want to export a dataset to an excel file. I found following code on the net... ( http://www.codeproject.com/csharp/Export.asp ) Excel.ApplicationClass excel = new ApplicationClass(); excel.Application.Workbooks.Add(true); DataTable table = DATASETNAME.Tables;
8
2831
by: DC Gringo | last post by:
I have a simple button that should open another window and export a datagrid to an Excel file. I'm getting: "Name 'window' is not declared." What do I need to declare or import? <INPUT ID="Button5" ONCLICK="Button5_Click" NAME="Button5" TYPE="button" VALUE="Export to Excel"> Sub Button5_Click()
6
4049
by: Elena | last post by:
I'm trying to export data to an Excel worksheet. I can export the data in the cell values perfectly. I need the code to change a header and footer for the worksheet, not for the columns. Is this possible? If so, I really need the code immediately. Thank you, Elena
13
13190
by: Hemant Sipahimalani | last post by:
The following piece of code is being used to export HTML to excel. HttpContext.Current.Response.ContentType = "application/vnd.ms-excel" HttpContext.Current.Response.AddHeader("content-disposition", "attachment;filename=ABC.xls") HttpContext.Current.Response.Write(strHTML) HttpContext.Current.Response.End() However when the user tries to...
1
9757
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm having I'd be most appreciative. The database is already constructed, I'm just wanting to export the data to an excel file. In short, I'm hoping...
3
7131
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I have a question for you. I have a .csv file which has many lines of data. Each line has many data fields which are delimited by ",". Now I need to extract part of data from this file but save it as an excel file. The data in this excel file will be imported into an Access database. The
19
11214
by: cj2 | last post by:
#1 Is there a quick way to export a datatable to an excel file? Or delimited file? #2 Where is the appropriate Microsoft monitored group to ask about writing reports in SQL Reporting services or SQL Server Business Intelligence Development Studio or whatever it's called?
2
6393
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the method.... it creates 6 sheets # region Namespaces using System;
0
7487
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7934
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7446
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5349
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4966
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3476
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1033
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
731
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.