This topic is locked

export results

4/19/2008 5:56:32 PM
PHPRunner General questions
N
nickrix author

When you export info to excel the headers are the colum names from the database , is there a way to change the headers? my database is made up of names like TOHS475 etc and wouldnt make sense to a visitor

J
Jane 4/21/2008

Hi,
you can replace field names with labels editing WriteTableData() function in the generated ..._export.php file.

Here is a sample:

echo '<td style="width: 100" x:str>'.PrepareForExcel(Label("CategoryID","TableName")).'</td>';

S
steveh 4/21/2008

For easier maintenance, why not create a view that names them as you want then export the view?
Otherwise you'll be editing that file every time you generate a project.