468,136 Members | 1,441 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,136 developers. It's quick & easy.

Export to Excel in BIFF format

Hi,

Currently in our application we use the MHTML way of exporting to Excel
i.e we render the datagrid HTML and set the MIME type to Excel.
This works great but has the following limitation:
1. File size is extremely large in some cases
2. Our clients using older versions of Excel or OpenOffice 2.0 cannot
open these files.

So, we would want to export to excel using the BIFF format. But from
what i have understood after googling for BIFF is that:
* Microsoft has just provided documentation on this format, but there
are no API's in the .Net framework that would help us to save data in
the BIFF format.
* We would either have to do Excel automation using COM interop, which
is generally not recommended, or use a pure .net third party component
to create excel files in the BIFF format.
Also hav'nt found any free third party components so far, we would have
to purchase one.

So basically i need to know if there is any easier way of exporting to
excel in BIFF format? or if there are any free components/libraries
available?
Would be grateful if any one who has solved this kind of an issue
before can point us in the right direction.

TIA,
Gautam

Nov 10 '06 #1
3 3725
See www.connectionstrings.com

The extended property can be set to "Excel 8.0"
Then you can use the oledb provider to create an xls using Create Table
statements and such.
We use it, it's super.
Wonder how we'll be able to embed formulas this way, i don't know.
You can do the same for csv but you can make csv 'manually' as well and old
excel could reado those as well.

<gg******@gmail.comschreef in bericht
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,

Currently in our application we use the MHTML way of exporting to Excel
i.e we render the datagrid HTML and set the MIME type to Excel.
This works great but has the following limitation:
1. File size is extremely large in some cases
2. Our clients using older versions of Excel or OpenOffice 2.0 cannot
open these files.

So, we would want to export to excel using the BIFF format. But from
what i have understood after googling for BIFF is that:
* Microsoft has just provided documentation on this format, but there
are no API's in the .Net framework that would help us to save data in
the BIFF format.
* We would either have to do Excel automation using COM interop, which
is generally not recommended, or use a pure .net third party component
to create excel files in the BIFF format.
Also hav'nt found any free third party components so far, we would have
to purchase one.

So basically i need to know if there is any easier way of exporting to
excel in BIFF format? or if there are any free components/libraries
available?
Would be grateful if any one who has solved this kind of an issue
before can point us in the right direction.

TIA,
Gautam

Nov 10 '06 #2
Hi Edwin,

Thanks for your reply.

I have understood a little of what you meant. Basically i have seen
code that can treat an excel file as a datasource and read data using
the OleDb connection. So similarly i guess what you are saying is that
we can create a table in excel and populate it with data.

But it would be great if you can give me some sample code.

Also, I guess its not possible to introduce certain formatting
attributes like font size, weight or colors using this method, right?
since we would like to set formatting as well.

thanks,
gautam

Nov 10 '06 #3
For reading i have:

http://www.hellobasic.com/cgi-bin/fo...num=1133003929

For creating and such not at this time, maybe later.. ever.

I learn about everything from here:
http://www.w3schools.com/sql/sql_create.asp

<gg******@gmail.comschreef in bericht
news:11*********************@k70g2000cwa.googlegro ups.com...
Hi Edwin,

Thanks for your reply.

I have understood a little of what you meant. Basically i have seen
code that can treat an excel file as a datasource and read data using
the OleDb connection. So similarly i guess what you are saying is that
we can create a table in excel and populate it with data.

But it would be great if you can give me some sample code.

Also, I guess its not possible to introduce certain formatting
attributes like font size, weight or colors using this method, right?
since we would like to set formatting as well.

thanks,
gautam

Nov 10 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by ian castleden | last post: by
7 posts views Thread by soubhagya | last post: by
3 posts views Thread by Jon Brookins | last post: by
5 posts views Thread by Igor | last post: by
13 posts views Thread by Hemant Sipahimalani | last post: by
9 posts views Thread by John Bailo | last post: by
3 posts views Thread by =?Utf-8?B?YzY3NjIyOA==?= | last post: by
reply views Thread by =?ISO-8859-1?Q?J=F6rg_Battermann?= | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.