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!

Link to open up excel

Status
Not open for further replies.

zishan619

Programmer
May 28, 2003
284
0
0
MX
Hi
I have written a code that would create a file and a link that opens up online into excel format.
Now the problem is that I need to customize it.
For example currently I am suing something like this
For each x in rs.Fields
strLine = strLine & x.name & chr(9)
Next
strLine = strLine & vbcrlf
This gives me the heading of the row.

Dim strFileNameRelative
set fso = server.CreateObject("scripting.FileSystemObject")
strFileNameRelative = "..\images\TAS\TAS_PayrollFiles\TAS_" & GetNTLogin & ".xls"
strFileName = server.MapPath(strFileNameRelative)
Set ts = fso.CreateTextFile (strFileName, True)
ts.writeline strLine
ts.Close
Set ts=Nothing
Set fso=Nothing

This would create the file
Response.write &quot;<A HREF=&quot;&quot;&quot; & strFileNameRelative & &quot;&quot;&quot;>Productivity for CC &quot; & CCNum & &quot; and date range from (&quot; & StartDate & &quot; to &quot; & EndDate & &quot;)</a>&quot;
This would create the link to the file

I want to create additional headings to it. for example
Before the heading I need
Do not use this for time
I need
to color the headings gray.
Basically doing a table and then creating a file from that table and then creating a link that would open that file in excel.
Hope I explained it well.
Thanks
Please help
 
When you create the desired output in a HTML table (extention .HTM!), Excel will have no trouble opening it.
And you can use CSS / <STYLE> for coloring and more...

hth,
Foxbox
ttmug.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top