Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

writing to Excel 1

Status
Not open for further replies.

tomhughes

Vendor
Aug 8, 2001
233
0
0
US
I am trying to write to an excel spreadsheet using Dreamweaver UltraDev. With Access I can use an ID number,
but with Excel there is no ID Field. Do I have to manually
create a Range named ID and use it for the ID ?

My excel file is named :
EmplNotReg.xls

Sheet Name :
EmployeesNotRegistered

I have given the first three columns range names of:
EmployeeName
WEINNo
DeptNum




 
I guess so, Just out of curiosities sake why not just use Access? The secret of life is honesty and fair dealing. If you can fake that, you've got it made.
Groucho Marx (1895-1977)
 
Hi,

I found a little server utility that will allow you to convert your asp generated rs page into an Excel file which I found to be easier than messing around with FSO and stuff.

In the preHTML server bit:
<% Response.ContentType = &quot;application/vnd.ms-excel&quot; %>

In the head bit:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!-- Begin
function goToURL() { window.location = &quot;detailspage.asp?<%= MM_keepNone & MM_joinChar(MM_keepNone) & &quot;ID=&quot; & rs.Fields.Item(&quot;ID&quot;).Value %>&quot;; }
// End -->
//-->
</script>

And at the foot of the page:
<input type=&quot;button&quot; value=&quot;Export Data as Excel File&quot; onClick=&quot;goToURL()&quot;>

The gotURL head script location is pretty much 'go to detail page' code that UD generates and I found that it works a treat.

There is a drawback which is that the export function (application/vnd.ms-excel) relies upon the client having Excel installed on their PC. It fails if this is false.

Anyway, I though that it offers you a further route to opening up the Access data via a web page.

Hope it helps.

M &quot;There are 3 kinds of people; those that can count and those that can't&quot;
 
WOW !!! - THIS IS NOTHING SHORT OF AWSOME - THANK YOU VERY MUCH
 
[2thumbsup]

You're welcome , Tom!

M &quot;There are 3 kinds of people; those that can count and those that can't&quot;
 
In the preHTML server bit:
<% Response.ContentType = &quot;application/vnd.ms-excel&quot; %>
Do you mean the top of the page??????????/
 
Hi,

Sure. Before you enter into any of the HTML page code, where you expect to find normal VBScript code and the like.

M &quot;There are 3 kinds of people; those that can count and those that can't&quot;
 
I am a novice programmer and am trying to use this code to do the same. Can someone point me to an example file?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top