Export to Microsoft Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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 said:
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).
 
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 said:
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).
 
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.
 
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 said:
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.
 
I'll try to work with OLEDB driver.

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

Thanks.
Igor
 
Back
Top