This topic is locked

Export Formatting Issues

2/3/2006 5:38:30 PM
ASPRunnerPro General questions
pbunyon99 author

we export records in 3 different ways, but each one has issues.

can you advise a solution for at least one of these issues...
1- exporting in regular Excel has no gridlines, and text fields with all numerics have extra characters in the cell... such as .... ="001234". If I change this field to numeric, I loose my 0 pad.
2- exporting in CSV has gridlines, but also has the extra characters in the cell.
3- exporting from the Printer Friendly rendering, looks GREAT when you open the HTM file with Excel, however, I am limited to 500 rows. Can I increase the max # of rows ?
Thanks.

admin 2/6/2006

Hi,

  1. for export in regular Excel with gridlines please change ..._exports.asp file in directory of your project. See my changes in Bold:
    Sub ExportToExcel

    Response.ContentType = "application/vnd.ms-excel"

    Response.AddHeader "Content-Disposition", "attachment; Filename=Users.xls"

    Response.Write "<meta http-equiv=""Content-Type"" content=""text/html; charset=Windows-" & 1252 & """>"

    Response.Write "<body>"

    Response.Write "<table border=1>"


2. extra characters in cell is standard data presentation in Excel. There is nothing you can do with that.
3. for increasing the max # of rows (for example, 1000 rows) please change ..._list.asp file in directory of your project. See my changes in Bold:

Records Per Page:


<SELECT name=PageSizeSelect onChange="java script: document.forms.frmAdmin.action.value='pagesize'; document.forms.frmAdmin.PageSize.value = document.forms.frmAdmin.PageSizeSelect.options[document.forms.frmAdmin.PageSizeS

elect.selectedIndex].value;document.forms.frmAdmin.submit();">

<OPTION value=10 <%if session("pagesize")=10 then Response.Write " selected"%>>10

<OPTION value=20 <%if session("pagesize")=20 then Response.Write " selected"%>>20

<OPTION value=30 <%if session("pagesize")=30 then Response.Write " selected"%>>30

<OPTION value=50 <%if session("pagesize")=50 then Response.Write " selected"%>>50

<OPTION value=100 <%if session("pagesize")=100 then Response.Write " selected"%>>100

<OPTION value=1000 <%if session("pagesize")=1000 then Response.Write " selected"%>>1000