By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

Creating an Excel Spreadsheet from code on a computer that does nothave Excel installed

P: n/a
I have an application that can read an Excel spreadsheet on a computer
that doesn't have Excel installed on using the Jet ODBC 4.0 driver.

I know need to modify the application to also be able to create a new
Excel spreadsheet and write data to it on the same computer, a
computer that does not have Excel, or even Office installed.

I have done some research on this and it appears it cannot be done.

Can anyone verify that or better yet, point me to a link that explains
how to do it?
Jan 28 '08 #1
Share this Question
Share on Google+
4 Replies


P: n/a
would you consider Excel XML.

http://www.carlosag.net/Tools/ExcelX...r/Default.aspx

Regards,

Trevor Benedict

MCSD

<za***@construction-imaging.comwrote in message
news:36**********************************@e25g2000 prg.googlegroups.com...
>I have an application that can read an Excel spreadsheet on a computer
that doesn't have Excel installed on using the Jet ODBC 4.0 driver.

I know need to modify the application to also be able to create a new
Excel spreadsheet and write data to it on the same computer, a
computer that does not have Excel, or even Office installed.

I have done some research on this and it appears it cannot be done.

Can anyone verify that or better yet, point me to a link that explains
how to do it?

Jan 28 '08 #2

P: n/a
Well you can write data files with a xls extension that will inmediatly be
converted by Excel when openned ( the user will not notice this )
this works for me ( office 2003 and higher )

if this might work for you i can show an example

hth

Michel

<za***@construction-imaging.comschreef in bericht
news:36**********************************@e25g2000 prg.googlegroups.com...
>I have an application that can read an Excel spreadsheet on a computer
that doesn't have Excel installed on using the Jet ODBC 4.0 driver.

I know need to modify the application to also be able to create a new
Excel spreadsheet and write data to it on the same computer, a
computer that does not have Excel, or even Office installed.

I have done some research on this and it appears it cannot be done.

Can anyone verify that or better yet, point me to a link that explains
how to do it?

Jan 28 '08 #3

P: n/a
On Jan 28, 5:03*pm, "Michel Posseth [MCP]" <M...@posseth.comwrote:
Well you can write data files with a xls extension that will inmediatly be
converted by Excel when openned *( the user will not notice this )
this works for me ( office 2003 and higher *)

if this might work for you i can show an example
I would like to see that please.
>
hth

Michel

<za...@construction-imaging.comschreef in berichtnews:36**********************************@e 25g2000prg.googlegroups.com...
I have an application that can read an Excel spreadsheet on a computer
that doesn't have Excel installed on using the Jet ODBC 4.0 driver.
I know need to modify the application to also be able to create a new
Excel spreadsheet and write data to it on the same computer, a
computer that does not have Excel, or even Office installed.
I have done some research on this and it appears it cannot be done.
Can anyone verify that or better yet, point me to a link that explains
how to do it?
Jan 29 '08 #4

P: n/a

Well one method i personally like an use a lot is this one

Imports System.Web

Imports System.IO
Private Sub CreateXLSFromDt(ByVal ds As DataSet, ByVal tablename As String,
ByVal location As String)
Dim grid As New System.Web.UI.WebControls.DataGrid

grid.HeaderStyle.Font.Bold = True

grid.DataSource = ds

grid.DataMember = tablename

grid.DataBind()

'// render the DataGrid control to a file

Using sw As New StreamWriter(location)

Using hw As New UI.HtmlTextWriter(sw)

grid.RenderControl(hw)

End Using

End Using

End Sub

usage

CreateXLSFromDt(dataset, TableNameInDataset , fullpath of file to create )

so in my situation
CreateXLSFromDt(dsBl, "tblBlok", "C:\testMp.xls") '
you just throw in a dataset and it will render the table data to a nicely
formated ( table with headers ) Excel sheet
Hope this works for you to

Michel


<za***@construction-imaging.comschreef in bericht
news:58**********************************@u10g2000 prn.googlegroups.com...
On Jan 28, 5:03 pm, "Michel Posseth [MCP]" <M...@posseth.comwrote:
Well you can write data files with a xls extension that will inmediatly be
converted by Excel when openned ( the user will not notice this )
this works for me ( office 2003 and higher )

if this might work for you i can show an example
I would like to see that please.
>
hth

Michel

<za...@construction-imaging.comschreef in
berichtnews:36**********************************@e 25g2000prg.googlegroups.com...
I have an application that can read an Excel spreadsheet on a computer
that doesn't have Excel installed on using the Jet ODBC 4.0 driver.
I know need to modify the application to also be able to create a new
Excel spreadsheet and write data to it on the same computer, a
computer that does not have Excel, or even Office installed.
I have done some research on this and it appears it cannot be done.
Can anyone verify that or better yet, point me to a link that explains
how to do it?

Jan 29 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.